Skip to content

xs2rust-endor-engine (port XS to Rust for endor) #2261

xs2rust-endor-engine (port XS to Rust for endor)

xs2rust-endor-engine (port XS to Rust for endor) #2261

Workflow file for this run

name: Browser Tests
on:
push:
branches: [master, llm]
pull_request:
branches: [master, llm]
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
permissions:
contents: read
# Defense in depth against npm lifecycle scripts running implicitly at install.
# The browser-test/ subtree uses npm and already sets `ignore-scripts=true` in
# its local .npmrc; these env vars cover the root yarn install as well.
# See designs/ci-no-npm-lifecycle.md.
env:
YARN_ENABLE_SCRIPTS: 'false'
npm_config_ignore_scripts: 'true'
# Cancel in-progress runs for the same branch when a new run is started
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 22
- name: Provide yarn # yarn is missing in the Selenium image
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: browser-test-report
path: browser-test/playwright-report/
retention-days: 30