Skip to content

End-to-End Tests

End-to-End Tests #18

Workflow file for this run

name: End-to-End Tests
on:
workflow_dispatch:
workflow_run:
workflows: ["Build and Deploy Images"]
types:
- completed
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: ctk
POSTGRES_PORT: 5432
POSTGRES_SSL: false
DEVELOPMENT_USER: [email protected]
AZURE_FUNCTION_PYTHON_URL: http://localhost:8000
jobs:
e2e:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
services:
api:
image: cliniciantoolkit.azurecr.io/ctk-functions:latest
credentials:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
ports:
- 8000:8000
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AZURE_OPENAI_API_KEY: unused
AZURE_OPENAI_LLM_DEPLOYMENT: unused
AZURE_OPENAI_ENDPOINT: unusued
LANGUAGE_TOOL_URL: http://localhost:8010/v2
REDCAP_API_TOKEN: unused
languagetool:
image: erikvl87/languagetool:6.5
ports:
- 8010:8010
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
volumes:
- ${{ github.workspace }}/init.sql:/docker-entrypoint-initdb.d/init.sql
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout Frontend
uses: actions/checkout@main
with:
repository: childmindresearch/ctk-webapp
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.4.x
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: |
npm install --legacy-peer-deps
npx playwright install
- name: Run tests
run: |
npm run test:integration
- name: Upload test artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: video-files
path: test-results/**/*.webm