Repository navigation
75 lines (69 loc) · 2.45 KB
/
Copy pathci.yml
File metadata and controls
75 lines (69 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: AutoRDS CI
on:
push:
pull_request:
jobs:
verify:
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v6
with:
version: "latest"
- uses: pnpm/action-setup@v4
with:
version: 11
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install backend
working-directory: backend
run: uv sync --extra dev --extra packaging
- name: Ruff
working-directory: backend
run: uv run ruff check .
- name: Backend, compiler, property, API and round-trip tests
working-directory: backend
run: uv run pytest -q
- name: Install frontend
working-directory: frontend
run: pnpm install --frozen-lockfile
- name: ESLint
working-directory: frontend
run: pnpm lint
- name: TypeScript
working-directory: frontend
run: pnpm exec tsc --noEmit
- name: Frontend unit tests
working-directory: frontend
run: pnpm test
- name: Production frontend build
working-directory: frontend
run: pnpm build
- name: Install Playwright Chromium
working-directory: frontend
run: pnpm exec playwright install --with-deps chromium
- name: Full milestone E2E
working-directory: frontend
env:
AUTORDS_DATA_DIR: ${{ runner.temp }}\AutoRDS-e2e
run: pnpm e2e
- name: Assemble local production build
shell: pwsh
run: ./scripts/build.ps1
- name: Production smoke test
shell: pwsh
run: |
$process = Start-Process -FilePath "backend\.venv\Scripts\python.exe" -ArgumentList "-m", "uvicorn", "app.main:app", "--host", "127.0.0.1", "--port", "8134" -WorkingDirectory "backend" -WindowStyle Hidden -PassThru
try {
for ($attempt = 0; $attempt -lt 30; $attempt++) {
try { if ((Invoke-WebRequest -UseBasicParsing http://127.0.0.1:8134/api/health).StatusCode -eq 200) { break } } catch { Start-Sleep 1 }
}
if ((Invoke-WebRequest -UseBasicParsing http://127.0.0.1:8134/).StatusCode -ne 200) { throw "Production UI unavailable" }
} finally { Stop-Process -Id $process.Id -Force }