2020-11-24 13:22:00 -07:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-05-22 04:27:54 -07:00
|
|
|
branches: [ master, release* ]
|
2020-11-24 13:22:00 -07:00
|
|
|
pull_request:
|
2022-05-22 04:27:54 -07:00
|
|
|
branches: [ master, release* ]
|
2020-11-24 13:22:00 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
run-eslint:
|
|
|
|
name: Run eslint
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository
|
2022-10-04 07:18:43 -07:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
2020-11-24 13:22:00 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Setup node environment
|
2022-09-27 10:47:43 -07:00
|
|
|
uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # tag=v3.5.0
|
2020-11-24 13:22:00 -07:00
|
|
|
with:
|
2022-09-29 22:53:04 -07:00
|
|
|
node-version: 16
|
2021-03-01 16:28:44 -07:00
|
|
|
check-latest: true
|
2020-11-24 13:22:00 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Get npm cache directory path
|
|
|
|
id: npm-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
|
|
|
|
|
|
|
- name: Cache node_modules
|
2022-10-03 03:47:12 -07:00
|
|
|
uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # tag=v3.0.10
|
2021-03-01 16:28:44 -07:00
|
|
|
id: npm-cache
|
2020-11-30 08:11:55 -07:00
|
|
|
with:
|
2021-03-01 16:28:44 -07:00
|
|
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-npm-
|
2020-11-30 08:11:55 -07:00
|
|
|
|
2020-11-24 13:22:00 -07:00
|
|
|
- name: Install Node.js dependencies
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm ci --no-audit
|
2020-11-24 13:22:00 -07:00
|
|
|
env:
|
|
|
|
SKIP_PREPARE: true
|
|
|
|
|
|
|
|
- name: Run eslint
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm run lint
|
2020-11-24 13:22:00 -07:00
|
|
|
|
2020-11-30 07:59:30 -07:00
|
|
|
run-stylelint-css:
|
|
|
|
name: Run stylelint (css)
|
2020-11-24 13:22:00 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository
|
2022-10-04 07:18:43 -07:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
2020-11-24 13:22:00 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Setup node environment
|
2022-09-27 10:47:43 -07:00
|
|
|
uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # tag=v3.5.0
|
2020-11-24 13:22:00 -07:00
|
|
|
with:
|
2022-09-29 22:53:04 -07:00
|
|
|
node-version: 16
|
2021-03-01 16:28:44 -07:00
|
|
|
check-latest: true
|
2020-11-24 13:22:00 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Get npm cache directory path
|
|
|
|
id: npm-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
2020-11-30 08:30:45 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Cache node_modules
|
2022-10-03 03:47:12 -07:00
|
|
|
uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # tag=v3.0.10
|
2021-03-01 16:28:44 -07:00
|
|
|
id: npm-cache
|
2020-11-30 08:11:55 -07:00
|
|
|
with:
|
2021-03-01 16:28:44 -07:00
|
|
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-npm-
|
|
|
|
|
|
|
|
- name: Set up stylelint matcher
|
2022-08-17 10:22:21 -07:00
|
|
|
uses: xt0rted/stylelint-problem-matcher@34db1b874c0452909f0696aedef70b723870a583 # tag=v1
|
2020-11-30 08:11:55 -07:00
|
|
|
|
2020-11-24 13:22:00 -07:00
|
|
|
- name: Install Node.js dependencies
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm ci --no-audit
|
2020-11-24 13:22:00 -07:00
|
|
|
env:
|
|
|
|
SKIP_PREPARE: true
|
|
|
|
|
|
|
|
- name: Run stylelint
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm run stylelint:css
|
2020-11-30 07:59:30 -07:00
|
|
|
|
|
|
|
run-stylelint-scss:
|
|
|
|
name: Run stylelint (scss)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out Git repository
|
2022-10-04 07:18:43 -07:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
|
2020-11-30 07:59:30 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Setup node environment
|
2022-09-27 10:47:43 -07:00
|
|
|
uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # tag=v3.5.0
|
2020-11-30 07:59:30 -07:00
|
|
|
with:
|
2022-09-29 22:53:04 -07:00
|
|
|
node-version: 16
|
2021-03-01 16:28:44 -07:00
|
|
|
check-latest: true
|
2020-11-30 07:59:30 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Get npm cache directory path
|
|
|
|
id: npm-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(npm config get cache)"
|
2020-11-30 08:30:45 -07:00
|
|
|
|
2021-03-01 16:28:44 -07:00
|
|
|
- name: Cache node_modules
|
2022-10-03 03:47:12 -07:00
|
|
|
uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 # tag=v3.0.10
|
2021-03-01 16:28:44 -07:00
|
|
|
id: npm-cache
|
2020-11-30 08:11:55 -07:00
|
|
|
with:
|
2021-03-01 16:28:44 -07:00
|
|
|
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-npm-
|
|
|
|
|
|
|
|
- name: Set up stylelint matcher
|
2022-08-17 10:22:21 -07:00
|
|
|
uses: xt0rted/stylelint-problem-matcher@34db1b874c0452909f0696aedef70b723870a583 # tag=v1
|
2020-11-30 08:11:55 -07:00
|
|
|
|
2020-11-30 07:59:30 -07:00
|
|
|
- name: Install Node.js dependencies
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm ci --no-audit
|
2020-11-30 07:59:30 -07:00
|
|
|
env:
|
|
|
|
SKIP_PREPARE: true
|
|
|
|
|
|
|
|
- name: Run stylelint
|
2021-03-01 16:28:44 -07:00
|
|
|
run: npm run stylelint:scss
|