Fixed https://github.com/advisories/GHSA-c2qf-rxjj-qqgw (semver) by u… #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and test code | |
on: | |
pull_request: | |
push: | |
branches-ignore: | |
- release-* | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
container: | |
image: response200/node-build:latest | |
options: --user root:root | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund | |
- run: scripts/lint.sh paths . | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: response200/node-build:latest | |
options: --user root:root | |
needs: lint # Run after lint so that lint job has an opportunity to fill npm cache. | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund | |
- run: scripts/test.sh | |
type-check: | |
runs-on: ubuntu-latest | |
container: | |
image: response200/node-build:latest | |
options: --user root:root | |
needs: lint # Run after lint so that lint job has an opportunity to fill npm cache. | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-dependencies-${{ hashFiles('**/package-lock.json') }} | |
- run: npm ci --cache ~/.npm --prefer-offline --ignore-scripts --no-fund | |
- run: scripts/type-check.sh |