Skip to content

Commit 0dec678

Browse files
committed
Simplified workflow using tox.ini
1 parent 4d51e8f commit 0dec678

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/code-coverage.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,14 @@ jobs:
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

28-
- name: Install Dependencies
28+
- name: Install tox
2929
run: |
3030
python -m pip install --upgrade pip
31-
# Install project dependencies first
32-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33-
if [ -f setup.py ]; then pip install -e .; fi
34-
# Install testing tools
35-
pip install pytest pytest-cov
31+
pip install tox
3632
3733
- name: Run Unit Tests with Coverage
3834
run: |
39-
pytest test/unit_tests/ --cov=src/ --cov-report=term-missing --cov-report=xml:coverage.xml --cov-fail-under=70
35+
tox -e coverage
4036
4137
- name: Upload Coverage Report
4238
uses: actions/upload-artifact@v4

tox.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ commands =
2323
description = Run integration tests
2424
commands =
2525
pytest test/integration_tests
26+
27+
[testenv:coverage]
28+
description = Run unit tests with coverage
29+
deps = pytest-cov
30+
commands =
31+
pytest test/unit_tests --cov=src --cov-report=term-missing --cov-report=xml:coverage.xml --cov-fail-under=70

0 commit comments

Comments
 (0)