Skip to content

Commit

Permalink
[Tech] update puppeteer and use firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Mar 4, 2024
1 parent 2401d01 commit 795cb68
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 26 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/cicd-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
ENV_PROFILE: ${{needs.version.outputs.ENV_PROFILE}}
VERSION: ${{needs.version.outputs.VERSION}}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
PUPPETEER_SKIP_DOWNLOAD: "true"
steps:
- name: Show version
run: echo "VERSION:${{ env.VERSION }} ENV_PROFILE:${{ env.ENV_PROFILE }}"
Expand Down Expand Up @@ -165,6 +166,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MONITORENV_VERSION: ${{ needs.version.outputs.VERSION }}
VERSION: ${{needs.version.outputs.VERSION}}
PUPPETEER_SKIP_DOWNLOAD: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -215,6 +217,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MONITORENV_VERSION: ${{ needs.version.outputs.VERSION }}
VERSION: ${{needs.version.outputs.VERSION}}
PUPPETEER_SKIP_DOWNLOAD: "true"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -239,6 +242,9 @@ jobs:
run: npm ci
working-directory: ./frontend

- name: Install Firefox
run: npx puppeteer browsers install firefox

- name: Run docker images
run: |
make run-infra-for-frontend-tests
Expand Down
48 changes: 24 additions & 24 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"jest-environment-node": "29.7.0",
"lint-staged": "13.0.3",
"prettier": "2.7.1",
"puppeteer": "22.2.0",
"puppeteer": "22.3.0",
"ramda": "0.29.1",
"type-fest": "4.4.0",
"typescript": "5.2.2",
Expand Down
3 changes: 2 additions & 1 deletion frontend/puppeteer/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default async () => {
'--enable-features=ExperimentalJavaScript'
],
defaultViewport: null,
headless: process.env.IS_HEADLESS === 'true'
headless: process.env.IS_HEADLESS === 'true',
product: 'firefox'
})

const version = await browser.version()
Expand Down

0 comments on commit 795cb68

Please sign in to comment.