Skip to content

Commit 2ebf493

Browse files
committed
Cache dependencies in CI
1 parent 0742af1 commit 2ebf493

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.github/workflows/lint.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ jobs:
1717
steps:
1818
- name: Checkout repository
1919
uses: actions/checkout@v5
20-
- name: Setup Node.js
21-
uses: actions/setup-node@v5
22-
with:
23-
node-version: lts/*
24-
package-manager-cache: false
2520
- name: Setup pnpm
2621
uses: pnpm/action-setup@v4
2722
with:
2823
version: latest
29-
run_install: true
24+
run_install: false
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v5
27+
with:
28+
node-version: lts/*
29+
cache: pnpm
30+
- name: Install dependencies
31+
run: pnpm install
3032
- name: Lint files
3133
run: pnpm lint

.github/workflows/test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@ jobs:
2424
steps:
2525
- name: Checkout repository
2626
uses: actions/checkout@v5
27-
- name: Setup Node.js
28-
uses: actions/setup-node@v5
29-
with:
30-
node-version: ${{ matrix.node }}
31-
package-manager-cache: false
3227
- name: Setup pnpm
3328
uses: pnpm/action-setup@v4
3429
with:
3530
version: latest
36-
run_install: true
31+
run_install: false
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v5
34+
with:
35+
node-version: ${{ matrix.node }}
36+
cache: pnpm
37+
- name: Install dependencies
38+
run: pnpm install
39+
- name: Install Chrome
40+
run: pnpm install-chrome-for-puppeteer
3741
# Prevent `No usable sandbox!` error on Ubuntu. See:
3842
# https://github.com/puppeteer/puppeteer/issues/13595
3943
- name: Disable AppArmor
4044
if: ${{ matrix.os == 'ubuntu-latest' }}
4145
run:
4246
echo 0 | sudo tee
4347
/proc/sys/kernel/apparmor_restrict_unprivileged_userns
44-
- name: Install Chrome
45-
run: pnpm install-chrome-for-puppeteer
4648
- name: Run tests
4749
run: pnpm test

0 commit comments

Comments
 (0)