ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows (#2038)

This commit is contained in:
Oscar Dominguez 2021-07-19 19:39:55 +02:00 committed by GitHub
parent ee3068eb6a
commit a4f0ff70fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: bahmutov/npm-install@v1
with:
cache: npm
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -31,9 +31,10 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Ensure dependencies are compatible with the version of node
run: echo 'engine-strict=true' >> .npmrc
- uses: bahmutov/npm-install@v1
- run: npm ci
- run: npm run test:ci
# separate job to set as required in branch protection,
@ -44,5 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: bahmutov/npm-install@v1
with:
cache: npm
- run: npm ci
- run: npm run lint