-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 873 Bytes
/
test.yml
File metadata and controls
35 lines (29 loc) · 873 Bytes
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
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
pip install pytest-cov
- name: Run tests with coverage
run: |
export PYTHONPATH=$PYTHONPATH:.
pytest backend/tests/ -v --cov=backend/services --cov=backend/routers --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false