Skip to content

Use hard-coded variables for docker-compose #14

Use hard-coded variables for docker-compose

Use hard-coded variables for docker-compose #14

Workflow file for this run

name: End-to-end tests
on:
push:
branches:
- "**"
pull_request:
jobs:
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Create test private key for signing alerts
run: ssh-keygen -m PKCS8 -t ecdsa -f $(pwd)/test-key
- name: Start Docker containers for testing
run: docker-compose -f docker-compose-test-e2e.yml up -d
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-
- name: Build frontend
run: pnpm run build
env:
NODE_ENV: test
- name: Run end-to-end tests
run: |
# Run Next.js frontend in background
pnpm run start &
pnpm run test:e2e
env:
NODE_ENV: test
PRIVATE_KEY_FILENAME: test-key
- uses: actions/upload-artifact@v4
with:
name: 'coverage-e2e'
path: './coverage-e2e'