Skip to content

Commit df10df0

Browse files
committed
covbadge job fix
1 parent 704eb53 commit df10df0

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

.github/workflows/covbadge.yaml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,37 @@ on:
1010
- tox.ini
1111

1212
jobs:
13+
run_coverage:
14+
name: Run project tests with coverage
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install tox tox-gh-actions
29+
30+
- name: Run tox for ${{ matrix.python-version }}
31+
run: |
32+
python -m tox
33+
34+
- name: Upload coverage data
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: covdata-312
38+
path: ./.coverage
39+
if-no-files-found: warn
40+
1341
coverage:
1442
name: Generate coverage status badge
15-
needs: run_tests
43+
needs: run_coverage
1644
runs-on: ubuntu-latest
1745
steps:
1846
- name: Check out the repo
@@ -30,8 +58,7 @@ jobs:
3058
- name: Download coverage data
3159
uses: actions/download-artifact@v4
3260
with:
33-
pattern: covdata-*
34-
merge-multiple: true
61+
pattern: covdata-312
3562

3663
- name: Combine coverage data
3764
run: |

.github/workflows/tests.yaml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,8 @@ jobs:
2929

3030
- name: Install dependencies
3131
run: |
32-
python -m pip install tox tox-gh-actions
32+
python -m pip install pytest
3333
34-
- name: Run tox for ${{ matrix.python-version }}
34+
- name: Run tests for ${{ matrix.python-version }}
3535
run: |
36-
python -m tox
37-
38-
- name: List coverage files
39-
run: find . -name .coverage*
40-
41-
- name: Upload coverage data
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: covdata-${{ matrix.python-version }}
45-
path: ./.coverage
46-
if-no-files-found: warn
36+
python -m pytest -v

0 commit comments

Comments
 (0)