-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (58 loc) · 1.63 KB
/
Copy pathbackend-ci.yml
File metadata and controls
75 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
74
75
name: Backend CI
on:
push:
paths:
- "apps/backend/**"
- "package/**"
pull_request:
paths:
- "apps/backend/**"
- "package/**"
jobs:
# Fast Package-Level Unit Tests
package-unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
cd package
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov pyyaml
- name: Run package unit tests
run: |
cd package
pytest tests/unit -v --cov=pyaslreport --cov-report=term-missing
#Backend Integration Tests
backend-integration-tests:
runs-on: ubuntu-latest
needs: package-unit-tests
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install backend dependencies
run: |
cd apps/backend
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-regressions pytest-cov httpx
- name: Install package (editable)
run: |
cd package
pip install -e .
- name: Run backend integration tests
run: |
cd apps/backend
pytest -v --cov=app --cov-report=term-missing --cov-report=xml