File tree Expand file tree Collapse file tree 2 files changed +33
-16
lines changed Expand file tree Collapse file tree 2 files changed +33
-16
lines changed Original file line number Diff line number Diff line change 10
10
- tox.ini
11
11
12
12
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
+
13
41
coverage :
14
42
name : Generate coverage status badge
15
- needs : run_tests
43
+ needs : run_coverage
16
44
runs-on : ubuntu-latest
17
45
steps :
18
46
- name : Check out the repo
30
58
- name : Download coverage data
31
59
uses : actions/download-artifact@v4
32
60
with :
33
- pattern : covdata-*
34
- merge-multiple : true
61
+ pattern : covdata-312
35
62
36
63
- name : Combine coverage data
37
64
run : |
Original file line number Diff line number Diff line change 29
29
30
30
- name : Install dependencies
31
31
run : |
32
- python -m pip install tox tox-gh-actions
32
+ python -m pip install pytest
33
33
34
- - name : Run tox for ${{ matrix.python-version }}
34
+ - name : Run tests for ${{ matrix.python-version }}
35
35
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
You can’t perform that action at this time.
0 commit comments