Skip to content

feat(playwright): setup #5

feat(playwright): setup

feat(playwright): setup #5

Workflow file for this run

name: E2E Tests
on:
push:
branches:
- main
schedule:
- cron: '0 11 * * *' # Runs every day at 11:00 UTC (6:00 AM EST)
pull_request:
jobs:
setup:
uses: ./.github/workflows/setup-workspace.yaml
test:
name: E2E Tests
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Job
uses: ./.github/actions/setup-job
- name: Install Playwright Browsers
shell: bash
run: pnpm run postinstall:setup-playwright
- name: Run E2E Tests
shell: bash
env:
# Inject app secrets like API keys here from github secrets
ABORT_DELAY: 5000
EXAMPLE_APP: Example App
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
# Normally would not be needed but we have no test environment in this template
sudo echo "127.0.0.1 local.example-test.com" | sudo tee -a /etc/hosts
pnpm run postinstall:setup-cert
# ----
pnpm run test:e2e:test
else
sudo echo "127.0.0.1 local.example-test.com" | sudo tee -a /etc/hosts
pnpm run postinstall:setup-cert
pnpm run test:e2e:local
fi
- name: Upload E2E Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30