test_e2e #142
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: test_e2e | |
on: | |
deployment: | |
environment: prod | |
push: | |
paths: | |
- e2e/** | |
- .github/workflows/test_e2e.yaml | |
schedule: | |
- cron: '0 9 * * SUN' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
name: Test E2E | |
defaults: | |
run: | |
working-directory: e2e | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install deps | |
run: npm ci | |
- name: Install browsers | |
run: npx playwright install --with-deps | |
- name: Wake up API | |
run: curl -sSf https://highscores.playsnake.no/readyz | |
- name: Run tests | |
run: npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: e2e/playwright-report/ | |
retention-days: 7 |