-
Notifications
You must be signed in to change notification settings - Fork 55
73 lines (58 loc) · 1.63 KB
/
run-tests.yml
File metadata and controls
73 lines (58 loc) · 1.63 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
name: "Run tests"
# Run tests on pull requests to main and on pushes to main
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
jobs:
backend-tests:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.13"
cache: "pip"
- name: Install Python dependencies
run: bash ./scripts/setup-env.sh
- name: Run Flask unit tests
run: bash ./scripts/run-server-tests.sh
frontend-tests:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "./client/package.json"
- name: Install JavaScript dependencies
working-directory: ./client
run: npm ci
- name: Install Playwright browsers
working-directory: ./client
run: npx playwright install --with-deps
- name: Run environment setup
run: bash ./scripts/setup-env.sh
- name: Run Playwright e2e tests
working-directory: ./client
run: npm run test:e2e
env:
CI: true
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report
path: client/playwright-report/
retention-days: 30