nvm/.github/workflows/lint.yml

78 lines
2.1 KiB
YAML
Raw Normal View History

name: 'Tests: linting'
on: [pull_request, push]
jobs:
eclint:
permissions:
contents: read
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-12-27 05:22:07 +08:00
raw.githubusercontent.com:443
2021-11-22 23:20:50 +08:00
nodejs.org:443
registry.npmjs.org:443
2022-10-17 08:51:14 +08:00
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run eclint
dockerfile_lint:
permissions:
contents: read
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
2022-12-27 05:22:07 +08:00
raw.githubusercontent.com:443
2021-11-22 23:20:50 +08:00
pkg-containers.githubusercontent.com:443
nodejs.org:443
registry.npmjs.org:443
2022-10-17 08:51:14 +08:00
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run dockerfile_lint
doctoc:
permissions:
contents: read
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-12-27 05:22:07 +08:00
raw.githubusercontent.com:443
2021-11-22 23:20:50 +08:00
nodejs.org:443
registry.npmjs.org:443
2022-10-17 08:51:14 +08:00
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run doctoc:check
test_naming:
permissions:
contents: read
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-12-27 05:22:07 +08:00
raw.githubusercontent.com:443
2022-10-17 08:51:14 +08:00
- uses: actions/checkout@v3
- name: check tests filenames
run: ./rename_test.sh --check