Skip to content

Update e2e.yaml

Update e2e.yaml #23

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 }}
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: Test LanguageTool
run: curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'text=Hello%20%2C%20world!&language=en-US&enabledOnly=false' 'http://localhost:8010/v2/check'

Check failure on line 65 in .github/workflows/e2e.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/e2e.yaml

Invalid workflow file

You have an error in your yaml syntax on line 65
- name: Initialize PostgreSQL
env:
PGPASSWORD: ${{ env.POSTGRES_PASSWORD }}
run: psql -h localhost -U ${POSTGRES_USER} -d ctk -f ./e2e/init.sql
- 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