Skip to content

Commit a9fe021

Browse files
add test coverage to ci/cd workflow
1 parent 4aeb7c9 commit a9fe021

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,17 @@ jobs:
3636
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.venv,yolov5,data
3737
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.venv,yolov5,data
3838
39-
- name: Run tests
39+
- name: Run tests with coverage
4040
run: |
41-
python -m pytest tests/ -v
41+
python -m pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v4
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
files: ./coverage.xml
48+
fail_ci_if_error: true
49+
verbose: true
4250

4351
build-and-push:
4452
name: Build and Push Docker Image

0 commit comments

Comments
 (0)