Skip to content

Avoid installing Firefox and Webkit in the Playwright CI #80

Avoid installing Firefox and Webkit in the Playwright CI

Avoid installing Firefox and Webkit in the Playwright CI #80

Workflow file for this run

# https://playwright.dev/docs/ci-intro
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PW_BASE_URL: http://localhost:4173
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- run: touch .env && echo "PW_BASE_URL='http://localhost:4173'" >> .env
- name: Build website
run: PW_BASE_URL=${{ env.PW_BASE_URL }} npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: PW_BASE_URL=${{ env.PW_BASE_URL }} npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30