Skip to content

Commit 40cc7f4

Browse files
committedOct 11, 2021
Add dependency caching
1 parent 5ee321e commit 40cc7f4

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed
 

‎.github/workflows/pr.yaml

+19-2
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,34 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
1213
- uses: actions/setup-node@v2
1314
with:
1415
node-version: 'lts/*'
1516
cache: 'npm'
16-
- run: npm install
17+
18+
- name: Cache Node modules
19+
uses: actions/cache@v2
20+
env:
21+
cache-name: cache-node-modules
22+
with:
23+
# npm cache files are stored in `~/.npm` on Linux/macOS
24+
path: ~/.npm
25+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-build-${{ env.cache-name }}-
28+
${{ runner.os }}-build-
29+
${{ runner.os }}-
30+
31+
- name: "Install dependencies"
32+
run: |
33+
npm install
34+
sudo npx playwright install-deps
1735
1836
- name: Lint
1937
run: npm run lint
2038
- name: Test Node
2139
run: npm run test-node
2240
- name: Test browsers
2341
run: |
24-
sudo npx playwright install-deps
2542
npm run test-browser

0 commit comments

Comments
 (0)
Please sign in to comment.