File tree Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Expand file tree Collapse file tree 1 file changed +39
-5
lines changed Original file line number Diff line number Diff line change 16
16
- name : Setup Python
17
17
uses : actions/setup-python@v5
18
18
with :
19
- python-version : ' 3.13'
20
- cache : ' pip'
21
- cache-dependency-path : ' requirements/*.txt'
19
+ python-version : " 3.13"
20
+ cache : " pip"
21
+ cache-dependency-path : " requirements/*.txt"
22
22
- name : Run tox
23
23
id : matrix
24
24
run : |
45
45
uses : actions/setup-python@v5
46
46
with :
47
47
python-version : ${{ matrix.python }}
48
- cache : ' pip'
49
- cache-dependency-path : ' requirements/*.txt'
48
+ cache : " pip"
49
+ cache-dependency-path : " requirements/*.txt"
50
50
- name : Run tests
51
51
env :
52
52
PGHOST : localhost
57
57
run : |
58
58
pip install $(grep -E "^(tox|tox-uv)==" requirements/local.txt)
59
59
tox -e ${{ matrix.tox_env }}
60
+ - name : Upload coverage data
61
+ uses : actions/upload-artifact@v4
62
+ with :
63
+ name : coverage-data-${{ matrix.tox_env }}
64
+ include-hidden-files : true
65
+ path : .coverage.*
66
+ if-no-files-found : ignore
60
67
services :
61
68
postgres :
62
69
image : postgres:17-alpine
65
72
ports :
66
73
- 5432:5432
67
74
options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
75
+
76
+ coverage :
77
+ name : Coverage
78
+ runs-on : ubuntu-24.04
79
+ needs : test
80
+ if : always()
81
+ steps :
82
+ - name : Checkout
83
+ uses : actions/checkout@v4
84
+ with :
85
+ persist-credentials : false
86
+ ref : ${{ github.event.pull_request.head.sha }}
87
+ - name : Setup Python
88
+ uses : actions/setup-python@v5
89
+ with :
90
+ python-version : " 3.13"
91
+ cache : " pip"
92
+ cache-dependency-path : " requirements/*.txt"
93
+ - uses : actions/download-artifact@v4
94
+ with :
95
+ pattern : coverage-data-*
96
+ merge-multiple : true
97
+ - name : Run coverage
98
+ run : |
99
+ pip install $(grep -E "^(tox|tox-uv)==" requirements/local.txt)
100
+ tox -e coverage
101
+ tox -qq exec -e coverage -- coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments