Skip to content

App router

App router #87

name: Playwright Tests
on:
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: vercel-preview-url
uses: zentered/vercel-preview-url@v1.1.9
id: vercel_preview_url
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
vercel_project_id: ${{ secrets.PROJECT_ID }}
- uses: UnlyEd/github-action-await-vercel@v1.2.43
id: await-vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
with:
deployment-url: ${{ steps.vercel_preview_url.outputs.preview_url }}
timeout: 180
poll-interval: 15
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
env:
PLAYWRIGHT_TEST_BASE_URL: "https://${{ steps.vercel_preview_url.outputs.preview_url }}"
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30