Skip to content

fix

fix #4

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, 'feat/browserstack']
permissions:
contents: read
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Prepare
run: |
corepack enable
# try and avoid timeout errors
yarn config set httpTimeout 100000
yarn --immutable
yarn dist:mini
- name: Spawn Companion
run: |
# Start Companion in the background
node companion/dist/main.js --machine-id ci_browserstack --log-level debug &
export COMPANION_PID=$!
yarn wait-on http://localhost:8000 --timeout 30000 --delay 5000
- name: 'BrowserStack Env Setup'
uses: 'browserstack/github-actions/[email protected]'
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
# build-name: BUILD_INFO
# project-name: REPO_NAME
# - name: 'BrowserStackLocal Setup'
# uses: 'browserstack/github-actions/[email protected]'
# with:
# local-testing: start
# local-identifier: random
- name: Run Playwright tests
run: |
cd playwright
yarn test:ci
# - name: 'BrowserStackLocal Setup'
# uses: 'browserstack/github-actions/[email protected]'
# with:
# local-testing: stop
# local-identifier: $BROWSERSTACK_LOCAL_IDENTIFIER
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30