Skip to content

Commit

Permalink
update: config and workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
vinit717 committed Oct 14, 2024
1 parent 6ced637 commit 4f0fd7b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Google Chrome
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- run: yarn
- run: yarn test
env:
CI: true
19 changes: 10 additions & 9 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ const baseOptions = {
port: 8000,
launchTimeout: 30000,
},
launch: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
};

const ciPipelineOptions = {
launch: {
executablePath: '/usr/bin/google-chrome-stable',
headless: 'new',
args: [
...(ci
? [
'--ignore-certificate-errors',
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
'--disable-gpu',
]
: ['--enable-gpu']),
'--no-sandbox',
'--disable-setuid-sandbox',
'--ignore-certificate-errors',
'--disable-dev-shm-usage',
'--disable-gpu',
],
},
server: baseOptions.server,
};

module.exports = ci ? ciPipelineOptions : baseOptions;

0 comments on commit 4f0fd7b

Please sign in to comment.