Skip to content

chore: replace BrowserStack with Cypress cross-browser matrix #1

chore: replace BrowserStack with Cypress cross-browser matrix

chore: replace BrowserStack with Cypress cross-browser matrix #1

Workflow file for this run

name: Cross-Browser Tests
on:
merge_group:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
NODE_VERSION: 22
jobs:
cross-browser:
name: ${{ matrix.os }} / ${{ matrix.browser }}
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
browser: [chrome, firefox]
include:
- os: windows-latest
browser: edge
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Build package
uses: ./.github/actions/build
with:
node: ${{ env.NODE_VERSION }}
- name: Install Cypress binary
run: npx cypress install
- name: Run cross-browser tests
uses: cypress-io/github-action@v6
with:
browser: ${{ matrix.browser }}
start: npm start
wait-on: 'http://127.0.0.1:3000'
spec: cypress/e2e/smoke-bs.cy.ts
config-file: cypress-bs.config.js
install: false
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v7
with:
name: cypress-screenshots-${{ matrix.os }}-${{ matrix.browser }}-${{ github.run_id }}
path: cypress/screenshots
retention-days: 30
if-no-files-found: ignore