refactor: Errors do not need "new" #2456
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Browser Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: '0 0 * * *' # Runs every day at midnight | |
jobs: | |
browser-tests: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
# This Chrome nightly image can no longer install browsers in Github CI for | |
# lack of some system dependencies: | |
# Package 'libasound2' has no installation candidate | |
# Unable to locate package libicu70 | |
# Unable to locate package libffi7 | |
# Unable to locate package libx264-163 | |
# container: | |
# image: selenium/standalone-chrome:nightly | |
# options: --user root # reintroducing a GH Actions default expectation | |
# ## https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user | |
# ## the Selenium image is configured to not run as root, so we have to undo some of it | |
# env: | |
# HOME: /root # Firefox complains otherwise | |
steps: | |
- name: Put unstable chrome where playwright would look for it | |
run: mv /opt/google/chrome /opt/google/chrome-unstable | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Provide yarn # yarn is missing in the Selenium image | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn install | |
- name: Build artifacts | |
run: yarn build | |
- name: Install browser test dependencies | |
working-directory: browser-test | |
run: npm ci --ignore-scripts | |
- name: Install Playwright Browsers | |
working-directory: browser-test | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
working-directory: browser-test | |
run: npx playwright test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: browser-test-report | |
path: browser-test/playwright-report/ | |
retention-days: 30 |