website: Automate e2e testing with a simpler method than #376

This commit is contained in:
Adrian Cowan
2023-01-06 20:51:49 +11:00
parent 42deae20f2
commit c369675991
2 changed files with 42 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
name: E2E Tests (Website)
on:
push:
branches:
- main
paths:
- backend/**
- website/**
pull_request:
paths:
- backend/**
- website/**
jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Start website, backend, etc
run: docker compose up ci --build -d
- name: Run Cypress tests
uses: cypress-io/github-action@v5.0.2
with:
browser: chrome
working-directory: website
- uses: actions/upload-artifact@v3
if: failure() # NOTE: screenshots will be generated only if E2E test failed
with:
name: cypress-screenshots
path: website/cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: website/cypress/videos