@@ -19,6 +19,25 @@ permissions:
1919 contents : read
2020
2121jobs :
22+ vitest :
23+ runs-on : ubuntu-latest
24+ permissions :
25+ contents : read
26+ pull-requests : write
27+ steps :
28+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+ with :
30+ persist-credentials : false
31+ - uses : actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
32+ with :
33+ node-version-file : package.json
34+ cache : npm
35+ cache-dependency-path : package-lock.json
36+ - name : Install Node dependencies
37+ run : npm ci
38+ - run : npm test
39+ - uses : davelosert/vitest-coverage-report-action@3c50566c523e04813df28de8f7c48dd97d663f1c # v2.11.2
40+
2241 mysql :
2342 runs-on : ubuntu-latest
2443 strategy :
@@ -41,12 +60,12 @@ jobs:
4160 - 3306:3306
4261
4362 steps :
44- - uses : actions/checkout@v5
63+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4564 with :
4665 persist-credentials : false
4766
4867 - name : Set up Python ${{ matrix.python-version }}
49- uses : actions/setup-python@v6
68+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5069 with :
5170 python-version : ${{ matrix.python-version }}
5271 allow-prereleases : true
5776 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
5877
5978 - name : Cache
60- uses : actions/cache@v4
79+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
6180 with :
6281 path : ${{ steps.pip-cache.outputs.dir }}
6382 key :
82101 COVERAGE_FILE : " .coverage.mysql.${{ matrix.python-version }}"
83102
84103 - name : Store coverage file
85- uses : actions/upload-artifact@v5
104+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
86105 with :
87106 name : coverage-mysql-${{ matrix.python-version }}
88107 path : .coverage.mysql.${{ matrix.python-version }}*
@@ -137,12 +156,12 @@ jobs:
137156 --health-retries 5
138157
139158 steps :
140- - uses : actions/checkout@v5
159+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
141160 with :
142161 persist-credentials : false
143162
144163 - name : Set up Python ${{ matrix.python-version }}
145- uses : actions/setup-python@v6
164+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
146165 with :
147166 python-version : ${{ matrix.python-version }}
148167 allow-prereleases : true
@@ -153,7 +172,7 @@ jobs:
153172 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
154173
155174 - name : Cache
156- uses : actions/cache@v4
175+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
157176 with :
158177 path : ${{ steps.pip-cache.outputs.dir }}
159178 key :
@@ -182,7 +201,7 @@ jobs:
182201 COVERAGE_FILE : " .coverage.${{ matrix.database }}.${{ matrix.python-version }}"
183202
184203 - name : Store coverage file
185- uses : actions/upload-artifact@v5
204+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
186205 with :
187206 name : coverage-${{ matrix.database }}-${{ matrix.python-version }}
188207 path : .coverage.${{ matrix.database }}.${{ matrix.python-version }}*
@@ -197,12 +216,12 @@ jobs:
197216 python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
198217
199218 steps :
200- - uses : actions/checkout@v5
219+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
201220 with :
202221 persist-credentials : false
203222
204223 - name : Set up Python ${{ matrix.python-version }}
205- uses : actions/setup-python@v6
224+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
206225 with :
207226 python-version : ${{ matrix.python-version }}
208227 allow-prereleases : true
@@ -213,7 +232,7 @@ jobs:
213232 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
214233
215234 - name : Cache
216- uses : actions/cache@v4
235+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
217236 with :
218237 path : ${{ steps.pip-cache.outputs.dir }}
219238 key :
@@ -235,7 +254,7 @@ jobs:
235254 COVERAGE_FILE : " .coverage.sqlite.${{ matrix.python-version }}"
236255
237256 - name : Store coverage file
238- uses : actions/upload-artifact@v5
257+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
239258 with :
240259 name : coverage-sqlite-${{ matrix.python-version }}
241260 path : .coverage.sqlite.${{ matrix.python-version }}*
@@ -247,12 +266,12 @@ jobs:
247266 fail-fast : false
248267
249268 steps :
250- - uses : actions/checkout@v5
269+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
251270 with :
252271 persist-credentials : false
253272
254273 - name : Set up Python ${{ matrix.python-version }}
255- uses : actions/setup-python@v6
274+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
256275 with :
257276 python-version : ' 3.10'
258277
@@ -262,7 +281,7 @@ jobs:
262281 echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
263282
264283 - name : Cache
265- uses : actions/cache@v4
284+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
266285 with :
267286 path : ${{ steps.pip-cache.outputs.dir }}
268287 key :
@@ -290,26 +309,26 @@ jobs:
290309 pull-requests : write
291310 contents : write
292311 steps :
293- - uses : actions/checkout@v4
312+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
294313 with :
295314 # Persist the credentials because coverage_comment needs them too.
296315 persist-credentials : true
297316
298- - uses : actions/download-artifact@v6
317+ - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
299318 id : download
300319 with :
301320 pattern : coverage-*
302321 merge-multiple : true
303322
304323 - name : Coverage comment
305324 id : coverage_comment
306- uses : py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc # v3.39
325+ uses : py-cov-action/python-coverage-comment-action@63f52f4fbbffada6e8dee8ec432de7e01df9ba79 # v3.41
307326 with :
308327 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
309328 MERGE_COVERAGE_FILES : true
310329
311330 - name : Store Pull Request comment to be posted
312- uses : actions/upload-artifact@v5
331+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
313332 if : steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
314333 with :
315334 name : python-coverage-comment-action
0 commit comments