Skip to main content

GitHub Actions

You first need to add an Encrypted Secret to your repository. The Playwright Dashboard reporter needs this to securily send the results to the proper project. GitHub provides a great documentation on how to do that here. Please follow the steps and create an encrypted secret called PLAYWRIGHT_DASHBOARD_SECRET in your repository.

Now that we have the secret set up in the repository, we can can inject it into our workflow step in the GitHub Actions workflow file.

.github/workflows/playwright.yml
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run Playwright tests
env: # This will be automatically detected by the playwright reporter
PLAYWRIGHT_DASHBOARD_SECRET: ${{ secrets.PLAYWRIGHT_DASHBOARD_SECRET }}
run: npx playwright test --reporter playwright-dashboard

Performance

Playwright Dashboard is made by Buildjet and we also provided special GitHub Actions runners that can speed up your Playwright tests signficantly. If you're experienceing performance issues, please consider upgrading your runners to BuildJet for GitHub Actions runners. More information can be found here

© 2022 Playwrightdashboard.com - All rights reserved.