99 pull_request :
1010
1111concurrency :
12- group : ci-main -${{ github.ref }}
12+ group : ${{ github.workflow }} -${{ github.ref }}
1313 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
1414
1515env :
2525 timeout-minutes : 15
2626 permissions :
2727 contents : read
28- strategy :
29- fail-fast : false
30- matrix :
31- include :
32- - name : linting,docs
33- python : ' 3.13'
34- allow_failure : false
35- use_factor : false
36-
37- - name : py313-sqlite-xdist-coverage
38- python : ' 3.13'
39- allow_failure : false
40- use_factor : true
41-
42- # start:Speeding up tests by running them in parallel.
43- - name : py312-djmain-sqlite-xdist-coverage
44- python : ' 3.12'
45- allow_failure : false
46- use_factor : false
47-
48- - name : py312-dj52-sqlite-xdist-coverage
49- python : ' 3.12'
50- allow_failure : false
51- use_factor : false
52-
53- - name : py312-dj51-sqlite-xdist-coverage
54- python : ' 3.12'
55- allow_failure : false
56- use_factor : false
57-
58- - name : py312-dj42-sqlite-xdist-coverage
59- python : ' 3.12'
60- allow_failure : false
61- use_factor : false
62- # end: Speeding up tests by running them in parallel.
63-
64- - name : py311-sqlite-xdist-coverage
65- python : ' 3.11'
66- allow_failure : false
67- use_factor : true
68-
69- - name : py310-sqlite-xdist-coverage
70- python : ' 3.10'
71- allow_failure : false
72- use_factor : true
73-
74- - name : py39-sqlite-xdist-coverage
75- python : ' 3.9'
76- allow_failure : false
77- use_factor : true
78-
79- - name : py313-djmain-postgres-coverage
80- python : ' 3.13'
81- allow_failure : false
82- use_factor : false
83-
84- - name : py313-djmain-mysql-coverage
85- python : ' 3.13'
86- allow_failure : false
87- use_factor : false
88-
89- - name : py313-djmain-sqlite-pytestmin
90- python : ' 3.13'
91- allow_failure : false
92- use_factor : false
93-
94- # pypy3: not included with coverage reports (much slower then).
95- - name : pypy3-dj52-sqlite
96- python : ' pypy3.11'
97- allow_failure : false
98- use_factor : false
28+ security-events : write
29+ env :
30+ TOXENV : ${{ matrix.name }}
9931 steps :
10032 - uses : actions/checkout@v4
10133 with :
@@ -124,7 +56,18 @@ jobs:
12456 uv tool install tox==4.26.0 --with tox-uv
12557
12658 - name : Run tox
127- run : tox ${{ matrix.use_factor && '-f' || '-e' }} ${{ matrix.name }}
59+ run : tox
60+
61+ - name : Upload zizmor SARIF report into the GitHub repo code scanning
62+ if : contains(matrix.name, 'linting')
63+ uses : github/codeql-action/upload-sarif@v3
64+ with :
65+ sarif_file : zizmor.sarif
66+ category : zizmor
67+
68+ - name : Prepare coverage file for upload
69+ if : contains(matrix.name, 'coverage')
70+ run : mv .coverage coverage.${TOXENV}
12871
12972 - name : Upload temporary coverage artifact
13073 if : contains(matrix.name, 'coverage')
@@ -135,6 +78,84 @@ jobs:
13578 retention-days : 1
13679 include-hidden-files : true
13780
81+ strategy :
82+ fail-fast : false
83+ matrix :
84+ include :
85+ - name : linting,docs
86+ python : ' 3.13'
87+ allow_failure : false
88+
89+ # Explicitly test min pytest.
90+ - name : py313-dj52-sqlite-pytestmin-coverage
91+ python : ' 3.13'
92+ allow_failure : false
93+
94+ - name : py313-dj52-postgres-xdist-coverage
95+ python : ' 3.13'
96+ allow_failure : false
97+
98+ - name : py313-dj51-postgres-xdist-coverage
99+ python : ' 3.13'
100+ allow_failure : false
101+
102+ - name : py312-dj42-postgres-xdist-coverage
103+ python : ' 3.12'
104+ allow_failure : false
105+
106+ - name : py311-dj50-postgres-xdist-coverage
107+ python : ' 3.11'
108+ allow_failure : false
109+
110+ - name : py311-dj42-postgres-xdist-coverage
111+ python : ' 3.11'
112+ allow_failure : false
113+
114+ - name : py310-dj52-postgres-xdist-coverage
115+ python : ' 3.10'
116+ allow_failure : false
117+
118+ - name : py310-dj51-postgres-xdist-coverage
119+ python : ' 3.10'
120+ allow_failure : false
121+
122+ - name : py310-dj42-postgres-xdist-coverage
123+ python : ' 3.10'
124+ allow_failure : false
125+
126+ - name : py311-dj51-mysql-coverage
127+ python : ' 3.11'
128+ allow_failure : false
129+
130+ - name : py310-dj42-mysql-coverage
131+ python : ' 3.10'
132+ allow_failure : false
133+
134+ - name : py39-dj42-mysql-xdist-coverage
135+ python : ' 3.9'
136+ allow_failure : false
137+
138+ - name : py313-djmain-sqlite-coverage
139+ python : ' 3.13'
140+ allow_failure : true
141+
142+ - name : py313-dj52-sqlite-coverage
143+ python : ' 3.13'
144+ allow_failure : true
145+
146+ - name : py312-dj51-sqlite-xdist-coverage
147+ python : ' 3.12'
148+ allow_failure : false
149+
150+ - name : py311-dj42-sqlite-xdist-coverage
151+ python : ' 3.11'
152+ allow_failure : false
153+
154+ # pypy3: not included with coverage reports (much slower then).
155+ - name : pypy3-dj42-postgres
156+ python : ' pypy3.9'
157+ allow_failure : false
158+
138159 report-coverage :
139160 name : Report Combined Coverage
140161 runs-on : ubuntu-24.04
@@ -166,16 +187,18 @@ jobs:
166187 coverage combine coverage-artifact-*
167188 coverage xml
168189 coverage html
169- coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
190+ coverage report --show-missing -- format=markdown >> $GITHUB_STEP_SUMMARY
170191
171192 - name : Determine retention days
172193 id : determine-retention-days
173194 run : |
174- if [ "${{ github.ref }} " = "refs/heads/main" ] || [[ "${{ github.ref } }" == refs/tags/* ]]; then
195+ if [ "${GITHUB_REF} " = "refs/heads/main" ] || [[ "${GITHUB_REF }" == refs/tags/* ]]; then
175196 echo "retention_days=90" >> $GITHUB_OUTPUT
176197 else
177198 echo "retention_days=3" >> $GITHUB_OUTPUT
178199 fi
200+ env :
201+ GITHUB_REF : ${{ github.ref }}
179202
180203 - name : Upload combined .coverage file
181204 uses : actions/upload-artifact@v4
@@ -193,7 +216,7 @@ jobs:
193216 retention-days : ${{ steps.determine-retention-days.outputs.retention_days }}
194217
195218 - name : Delete temporary coverage artifacts from run
196- uses : geekyeggo/delete-artifact@v5
219+ uses : geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # 5.1.0
197220 with :
198221 name : coverage-artifact-*
199222
0 commit comments