Skip to content

Commit

Permalink
Add puppeteer config for CI environments
Browse files Browse the repository at this point in the history
  • Loading branch information
KshitijThareja committed Aug 6, 2024
1 parent 0821b88 commit d921297
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
environment: percy_tests
outputs:
percy_url: ${{ steps.extract-url.outputs.percy_url }}
env:
CI: true
steps:
- uses: actions/checkout@v4
- name: Use Node.js
Expand All @@ -41,6 +43,8 @@ jobs:
run: |
yarn --frozen-lockfile
npm rebuild node-sass
- name: Download Chromium
run: npx puppeteer browsers install chrome
- name: Extract jsdocs and environment info
run: yarn pregenerate
- name: Run visual tests
Expand Down
8 changes: 8 additions & 0 deletions .puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { join } = require('path');

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
cacheDirectory: process.env.CI ? join(__dirname, '.cache', 'puppeteer') : undefined,
};

0 comments on commit d921297

Please sign in to comment.