mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
CI: cache npm's cache across jobs & runs 💚
This commit is contained in:
parent
8ba1adeb39
commit
673eb4d6c7
1 changed files with 24 additions and 0 deletions
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
|
@ -2,6 +2,9 @@ name: test
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
npm_config_cache: /tmp/npm-cache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit-tests:
|
unit-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -15,6 +18,13 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- id: cache-npm
|
||||||
|
name: restore npm cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: npm-cache-${{ github.ref_name }}
|
||||||
|
path: ${{ env.npm_config_cache }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
@ -33,6 +43,13 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- id: cache-npm
|
||||||
|
name: restore npm cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: npm-cache-${{ github.ref_name }}
|
||||||
|
path: ${{ env.npm_config_cache }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
@ -51,6 +68,13 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- id: cache-npm
|
||||||
|
name: restore npm cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: npm-cache-${{ github.ref_name }}
|
||||||
|
path: ${{ env.npm_config_cache }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
|
Loading…
Add table
Reference in a new issue