2020-11-07 16:09:08 +08:00
|
|
|
name: 'Tests: linting'
|
|
|
|
|
|
|
|
on: [pull_request, push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
eclint:
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-11-07 16:09:08 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
github.com:443
|
|
|
|
nodejs.org:443
|
|
|
|
registry.npmjs.org:443
|
2022-10-17 08:51:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-28 13:23:56 +08:00
|
|
|
- uses: ljharb/actions/node/install@main
|
|
|
|
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
2020-11-07 16:09:08 +08:00
|
|
|
with:
|
|
|
|
node-version: 'lts/*'
|
2021-07-28 13:23:56 +08:00
|
|
|
- run: npm run eclint
|
2020-11-07 16:09:08 +08:00
|
|
|
|
|
|
|
dockerfile_lint:
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-11-07 16:09:08 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
ghcr.io:443
|
|
|
|
github.com:443
|
|
|
|
pkg-containers.githubusercontent.com:443
|
|
|
|
nodejs.org:443
|
|
|
|
registry.npmjs.org:443
|
2022-10-17 08:51:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-28 13:23:56 +08:00
|
|
|
- uses: ljharb/actions/node/install@main
|
|
|
|
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
2020-11-07 16:09:08 +08:00
|
|
|
with:
|
|
|
|
node-version: 'lts/*'
|
2021-08-05 23:35:22 +08:00
|
|
|
- run: npm run dockerfile_lint
|
2020-11-07 16:09:08 +08:00
|
|
|
|
|
|
|
doctoc:
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-11-07 16:09:08 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
github.com:443
|
|
|
|
nodejs.org:443
|
|
|
|
registry.npmjs.org:443
|
2022-10-17 08:51:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-28 13:23:56 +08:00
|
|
|
- uses: ljharb/actions/node/install@main
|
|
|
|
name: 'nvm install ${{ matrix.node-version }} && npm install'
|
2020-11-07 16:09:08 +08:00
|
|
|
with:
|
|
|
|
node-version: 'lts/*'
|
2021-07-28 13:23:56 +08:00
|
|
|
- run: npm run doctoc:check
|
2021-01-04 07:49:05 +08:00
|
|
|
|
|
|
|
test_naming:
|
2021-09-10 14:09:45 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2021-01-04 07:49:05 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-11-22 23:20:50 +08:00
|
|
|
- uses: step-security/harden-runner@v1
|
|
|
|
with:
|
|
|
|
allowed-endpoints:
|
|
|
|
github.com:443
|
2022-10-17 08:51:14 +08:00
|
|
|
- uses: actions/checkout@v3
|
2021-01-04 07:49:05 +08:00
|
|
|
- name: check tests filenames
|
|
|
|
run: ./rename_test.sh --check
|