Files
nowdatabase/.github/workflows/e2e.yaml
T

45 lines
1.2 KiB
YAML

name: 'End-to-end tests'
on:
pull_request:
types: [opened, reopened]
push:
branches:
- '**'
paths-ignore:
- '**/*.md'
- '.github/workflows/build.yaml'
jobs:
e2e_tests:
name: 'End-to-end tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: 'Install root dependencies'
run: npm ci
# Has to be installed out-of-container because prisma client needs these, and it isnt run by docker...
# Could fix, but would require checking in the container if prisma clients are generated
- name: 'Install backend dependencies'
working-directory: 'backend'
run: npm ci
- name: 'Generate prisma clients' # has to be after root ci, but before checking code.
run: npm run prisma
- name: 'Start containers'
run: npm run start:anon -- -d && sleep 60
- name: Cypress
uses: cypress-io/github-action@v6
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2