-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.07 KB
/
coverage.yml
File metadata and controls
45 lines (38 loc) · 1.07 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
name: Code Coverage
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
coverage:
runs-on: ubuntu-latest
env:
BOT_TOKEN: test-token
MINDEE_API_KEY: test-key
MINDEE_MODEL_ID: test-model
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
- name: Run DB migrations
run: python -m alembic -c backend/alembic.ini upgrade head
- name: Run tests with coverage
run: |
pytest --cov=backend --cov-config=.coveragerc \
--cov-report=xml --cov-report=term-missing \
--cov-fail-under=80
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false