Skip to content

Commit 0737282

Browse files
authored
Update Codecov workflow for Python setup and actions
1 parent 61c318d commit 0737282

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.github/workflows/codecov.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
name: Workflow for Codecov
2+
23
on: [push]
34

45
jobs:
56
run:
67
runs-on: ${{ matrix.os }}
78
strategy:
89
matrix:
9-
os: [windows-latest, ubuntu-latest] # macos-latest, windows-latest
10-
env:
11-
OS: ${{ matrix.os }}
12-
PYTHON: '3.12'
10+
os: [ubuntu-latest, windows-latest]
11+
1312
steps:
14-
- uses: actions/checkout@master
15-
- name: Setup Python
16-
uses: actions/setup-python@master
17-
with:
18-
python-version: 3.12
19-
- name: Generate coverage report
20-
run: |
21-
pip install -r requirements.txt
22-
pip install -U scikit-learn
23-
pip install pytest-cov
24-
pip install build
25-
pip install setuptools
26-
python setup.py build_ext --inplace
27-
pytest tests/unittests.py --cov=classix
28-
coverage xml
29-
- name: Upload coverage to Codecov
30-
uses: codecov/codecov-action@v2
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
20+
- name: Install dependencies
21+
run: |
22+
pip install -r requirements.txt
23+
pip install -U scikit-learn
24+
pip install pytest pytest-cov coverage setuptools
25+
pip install .
26+
27+
- name: Run tests with coverage
28+
run: |
29+
pytest tests/unittests.py --cov=classix
30+
coverage xml
3131
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)