Playwright #330
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright | |
on: | |
deployment_status: | |
jobs: | |
tests: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
- name: Install dependencies | |
run: yarn | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Waiting for 200 from the Vercel preview | |
uses: patrickedqvist/wait-for-vercel-preview@v1.2.0 | |
id: waitFor200 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
max_timeout: 360 | |
- name: Run Playwright tests | |
run: npx -p @playwright/test playwright test | |
env: | |
PLAYWRIGHT_TEST_BASE_URL: ${{ steps.waitFor200.outputs.url }} | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: playwright-results | |
path: playwright-report | |
retention-days: 30 |