Skip to content

Commit d78305f

Browse files
authored
Merge pull request #398 from ForgeRock/ci-improvements
feat(ci): cache playwright browsers and use .node-version
2 parents e3410c8 + f37b783 commit d78305f

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-node@v4
3333
id: cache
3434
with:
35-
node-version: '22.14.0'
35+
node-version-file: '.node-version'
3636
cache: 'pnpm'
3737

3838
- run: pnpm install --frozen-lockfile
@@ -42,6 +42,14 @@ jobs:
4242
- run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
4343
- run: pnpm nx sync:check
4444

45+
- name: Cache Playwright browsers
46+
uses: actions/cache@v4
47+
with:
48+
path: ~/.cache/ms-playwright
49+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
50+
restore-keys: |
51+
${{ runner.os }}-playwright-
52+
4553
- run: pnpm exec playwright install
4654

4755
- uses: nrwl/nx-set-shas@v4

.github/workflows/publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/setup-node@v4
3232
id: cache
3333
with:
34-
node-version: '22.14.0'
34+
node-version-file: '.node-version'
3535
cache: 'pnpm'
3636

3737
- run: pnpm install --frozen-lockfile
@@ -40,6 +40,14 @@ jobs:
4040
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
4141
- run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
4242

43+
- name: Cache Playwright browsers
44+
uses: actions/cache@v4
45+
with:
46+
path: ~/.cache/ms-playwright
47+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-playwright-
50+
4351
- run: pnpm exec playwright install
4452

4553
- uses: nrwl/nx-set-shas@v4

.github/workflows/snapshot.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- uses: actions/setup-node@v4
4545
id: cache
4646
with:
47-
node-version: '22.14.0'
47+
node-version-file: '.node-version'
4848
cache: 'pnpm'
4949

5050
- run: pnpm install --frozen-lockfile
@@ -53,6 +53,14 @@ jobs:
5353
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested
5454
- run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
5555

56+
- name: Cache Playwright browsers
57+
uses: actions/cache@v4
58+
with:
59+
path: ~/.cache/ms-playwright
60+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
61+
restore-keys: |
62+
${{ runner.os }}-playwright-
63+
5664
- run: pnpm exec playwright install
5765

5866
- uses: nrwl/nx-set-shas@v4

0 commit comments

Comments
 (0)