Skip to content

Commit eb41367

Browse files
committed
ci: add caching for Puppeteer Chrome binary
1 parent f2781dc commit eb41367

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.github/workflows/dependencies-install/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ runs:
1919
always-auth: true
2020
cache: 'pnpm'
2121

22+
- name: Get Puppeteer version
23+
id: puppeteer-version
24+
run: |
25+
PUPPETEER_VERSION=$(node -p "require('./packages/elements/package.json').devDependencies.puppeteer")
26+
echo "version=$PUPPETEER_VERSION" >> $GITHUB_OUTPUT
27+
shell: bash
28+
29+
- name: Cache Puppeteer Chrome Binary
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.cache/puppeteer
33+
key: puppeteer-${{ runner.os }}-${{ steps.puppeteer-version.outputs.version }}
34+
restore-keys: |
35+
puppeteer-${{ runner.os }}-
36+
2237
- name: Restore Turborepo Cache
2338
uses: actions/cache@v4
2439
with:

packages/elements/stencil.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ export const config: Config = {
4343
testing: {
4444
setupFilesAfterEnv: ['./setupSpecTests.ts'],
4545
browserArgs: ['--no-sandbox', '--disable-setuid-sandbox'],
46-
// explicitly cache it in node_modules to make it easier to cache it in CI
47-
cacheDirectory: join(__dirname, 'node_modules', '.cache', 'puppeteer'),
4846
},
4947
preamble: 'Crafted with ❤ by inovex GmbH',
5048
};

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)