Skip to content

E2E Tests

E2E Tests #9

Workflow file for this run

name: E2E Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
# This is used to run github actions locally.
# This installation step is required when using act
# - name: Set up Docker Compose
# run: |
# curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose
# docker-compose version
# docker compose version
- name: Spin up app
run: |
docker-compose -f "docker-compose.yml" up --build -d
echo "Waiting 60 seconds for app container to initialize..."
sleep 60
- name: Install dependencies
run: npm install -g yarn && yarn
working-directory: client-app
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
working-directory: client-app
- name: Run Playwright tests
run: yarn playwright test
working-directory: client-app
- uses: actions/upload-artifact@v4
if: always()
with:
name: client-app-report
path: client-app/playwright-report/
retention-days: 10