|
@@ -1,19 +1,4 @@
|
|
|
----
|
|
|
-#################################
|
|
|
-#################################
|
|
|
-## Super Linter GitHub Actions ##
|
|
|
-#################################
|
|
|
-#################################
|
|
|
-name: Lint Code Base
|
|
|
-
|
|
|
-#
|
|
|
-# Documentation:
|
|
|
-# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
|
-#
|
|
|
-
|
|
|
-#############################
|
|
|
-# Start the job on all push #
|
|
|
-#############################
|
|
|
+name: Lint Code
|
|
|
on:
|
|
|
push:
|
|
|
branches:
|
|
@@ -22,41 +7,41 @@ on:
|
|
|
branches:
|
|
|
- main
|
|
|
|
|
|
-###############
|
|
|
-# Set the Job #
|
|
|
-###############
|
|
|
jobs:
|
|
|
build:
|
|
|
- # Name the Job
|
|
|
- name: Lint Code Base
|
|
|
- # Set the agent to run on
|
|
|
+ name: Lint Code
|
|
|
runs-on: ubuntu-latest
|
|
|
-
|
|
|
- ##################
|
|
|
- # Load all steps #
|
|
|
- ##################
|
|
|
steps:
|
|
|
- ##########################
|
|
|
- # Checkout the code base #
|
|
|
- ##########################
|
|
|
- - name: Checkout Code
|
|
|
- uses: actions/checkout@v2
|
|
|
+ - name: Checkout repository
|
|
|
+ uses: actions/checkout@v3
|
|
|
+
|
|
|
+ - name: Install Node.js
|
|
|
+ uses: actions/setup-node@v3
|
|
|
with:
|
|
|
- # Full git history is needed to get a proper list of changed files within `super-linter`
|
|
|
- fetch-depth: 0
|
|
|
+ node-version: 16
|
|
|
|
|
|
- - name: Setup node
|
|
|
- uses: actions/setup-node@v2
|
|
|
+ - uses: pnpm/action-setup@v2
|
|
|
+ name: Install pnpm
|
|
|
+ id: pnpm-install
|
|
|
with:
|
|
|
- node-version: "16"
|
|
|
- registry-url: https://registry.npmjs.com/
|
|
|
+ version: 7
|
|
|
+ run_install: false
|
|
|
+
|
|
|
+ - name: Get pnpm store directory
|
|
|
+ id: pnpm-cache
|
|
|
+ shell: bash
|
|
|
+ run: |
|
|
|
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
|
|
|
|
- - name: Setup pnpm
|
|
|
- uses: pnpm/action-setup@v2
|
|
|
+ - uses: actions/cache@v3
|
|
|
+ name: Setup pnpm cache
|
|
|
with:
|
|
|
- version: latest
|
|
|
+ path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
|
|
+ key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
+ restore-keys: |
|
|
|
+ ${{ runner.os }}-pnpm-store-
|
|
|
|
|
|
- - name: Build
|
|
|
+ - name: Start Lint Code
|
|
|
run: |
|
|
|
pnpm install --no-frozen-lockfile
|
|
|
pnpm lint
|