@@ -36,56 +36,11 @@ jobs:
36
36
python -m tox
37
37
38
38
- name : List coverage files
39
- run : find . -name .coverage. *
39
+ run : find . -name .coverage*
40
40
41
41
- name : Upload coverage data
42
42
uses : actions/upload-artifact@v4
43
43
with :
44
44
name : covdata-${{ matrix.python-version }}
45
45
path : ./.coverage
46
46
if-no-files-found : warn
47
-
48
- coverage :
49
- name : Generate coverage status badge
50
- needs : run_tests
51
- runs-on : ubuntu-latest
52
- steps :
53
- - name : Check out the repo
54
- uses : actions/checkout@v4
55
-
56
- - name : Set up Python
57
- uses : actions/setup-python@v5
58
- with :
59
- python-version : 3.12
60
-
61
- - name : Install dependencies
62
- run : |
63
- python -m pip install tox tox-gh-actions
64
-
65
- - name : Download coverage data
66
- uses : actions/download-artifact@v4
67
- with :
68
- pattern : covdata-*
69
- merge-multiple : true
70
-
71
- - name : List downloaded artifacts
72
- run : ls -la
73
-
74
- - name : Combine coverage data
75
- run : |
76
- python -m tox -e coverage
77
- export TOTAL_COV=$(python -c "import json; print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
78
- echo total_cov=$TOTAL_COV >> $GITHUB_ENV
79
- echo ### Total coverage: ${TOTAL_COV}% >> $GITHUB_STEP_SUMMARY
80
-
81
- - name : Generate coverage badge
82
- uses : schneegans/dynamic-badges-action@v1.7.0
83
- with :
84
- auth : ${{ secrets.GIST_TOKEN }}
85
- gistID : f6cec4c4c8e1733cfe45f807918a128a
86
- filename : covbadge.json
87
- label : coverage
88
- message : ${{ env.total_cov }}%
89
- minColorRange : 50
90
- maxColorRange : 90
91
- valColorRange : ${{ env.total_cov }}
0 commit comments