|
15 | 15 | ci: |
16 | 16 | name: CI |
17 | 17 | runs-on: ubuntu-latest |
18 | | - # TIMEOUT EXCEPTION: Postgres startup, DB migration, embedding service model load, and 5 test projects with coverage require ~20 min. |
19 | | - timeout-minutes: 30 |
| 18 | + # TIMEOUT EXCEPTION: Postgres startup, DB migration, embedding service model load, 5 test projects with coverage, |
| 19 | + # 4 API processes, dashboard dev server, and Playwright e2e suite require ~35 min. |
| 20 | + timeout-minutes: 45 |
20 | 21 | env: |
21 | 22 | DB_PASSWORD: changeme |
22 | 23 | TEST_POSTGRES_CONNECTION: Host=localhost;Database=postgres;Username=postgres;Password=changeme |
@@ -75,13 +76,68 @@ jobs: |
75 | 76 | - name: Test |
76 | 77 | run: make test |
77 | 78 |
|
| 79 | + - name: Install Playwright browsers |
| 80 | + run: cd Dashboard/dashboard-ts && pnpm exec playwright install --with-deps chromium |
| 81 | + |
| 82 | + - name: Start APIs for e2e tests |
| 83 | + run: | |
| 84 | + dotnet build --configuration Release --no-restore |
| 85 | + ConnectionStrings__Postgres="Host=localhost;Database=gatekeeper;Username=postgres;Password=changeme" \ |
| 86 | + dotnet run --no-build --project Gatekeeper/Gatekeeper.Api/Gatekeeper.Api.csproj \ |
| 87 | + --no-launch-profile --urls "http://localhost:5002" & |
| 88 | + ConnectionStrings__Postgres="Host=localhost;Database=clinical;Username=postgres;Password=changeme" \ |
| 89 | + dotnet run --no-build --project Clinical/Clinical.Api/Clinical.Api.csproj \ |
| 90 | + --no-launch-profile --urls "http://localhost:5080" & |
| 91 | + ConnectionStrings__Postgres="Host=localhost;Database=scheduling;Username=postgres;Password=changeme" \ |
| 92 | + dotnet run --no-build --project Scheduling/Scheduling.Api/Scheduling.Api.csproj \ |
| 93 | + --no-launch-profile --urls "http://localhost:5001" & |
| 94 | + ConnectionStrings__Postgres="Host=localhost;Database=icd10;Username=postgres;Password=changeme" \ |
| 95 | + dotnet run --no-build --project ICD10/ICD10.Api/ICD10.Api.csproj \ |
| 96 | + --no-launch-profile --urls "http://localhost:5090" & |
| 97 | + # Wait for all 4 APIs to be healthy |
| 98 | + for url in http://localhost:5002/health http://localhost:5080/health http://localhost:5001/health http://localhost:5090/health; do |
| 99 | + for i in $(seq 1 60); do |
| 100 | + if curl -sf "$url" > /dev/null; then |
| 101 | + echo "$url ready" |
| 102 | + break |
| 103 | + fi |
| 104 | + sleep 2 |
| 105 | + done |
| 106 | + done |
| 107 | +
|
| 108 | + - name: Start dashboard dev server for e2e |
| 109 | + run: | |
| 110 | + cd Dashboard/dashboard-ts |
| 111 | + pnpm dev --host 0.0.0.0 & |
| 112 | + for i in $(seq 1 30); do |
| 113 | + if curl -sf http://localhost:5173 > /dev/null; then |
| 114 | + echo "Dashboard ready" |
| 115 | + exit 0 |
| 116 | + fi |
| 117 | + sleep 2 |
| 118 | + done |
| 119 | + echo "Dashboard failed to start" |
| 120 | + exit 1 |
| 121 | +
|
| 122 | + - name: E2E tests (Playwright) |
| 123 | + run: make dashboard-ts-e2e |
| 124 | + |
78 | 125 | - name: Upload coverage |
79 | 126 | uses: actions/upload-artifact@v4 |
80 | 127 | if: always() |
81 | 128 | with: |
82 | 129 | name: coverage-report |
83 | 130 | path: | |
84 | 131 | TestResults/**/coverage.* |
| 132 | + Dashboard/dashboard-ts/coverage/** |
| 133 | + retention-days: 7 |
| 134 | + |
| 135 | + - name: Upload Playwright report |
| 136 | + uses: actions/upload-artifact@v4 |
| 137 | + if: always() |
| 138 | + with: |
| 139 | + name: playwright-report |
| 140 | + path: Dashboard/dashboard-ts/playwright-report/ |
85 | 141 | retention-days: 7 |
86 | 142 |
|
87 | 143 | - name: Build |
|
0 commit comments