Skip to content

Commit 377e8bd

Browse files
authored
Merge pull request #528 from xcp-ng/vml/pre-commit-ci
Use prek in the CI to run the code checks (to ensure consistency with pre-commit checks)
2 parents 539d0f3 + 12b17cc commit 377e8bd

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/code-checkers.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on: [push]
44

55
permissions: {}
66

7+
env:
8+
PREK_COLOR: "always"
9+
710
jobs:
811
mypy:
912
runs-on: ubuntu-latest
@@ -16,7 +19,7 @@ jobs:
1619
run: cp data.py-dist data.py
1720
- name: Create a dummy vm_data.py
1821
run: cp vm_data.py-dist vm_data.py
19-
- run: mypy --install-types --non-interactive .
22+
- run: prek -a mypy
2023

2124
pyright:
2225
runs-on: ubuntu-latest
@@ -29,7 +32,7 @@ jobs:
2932
run: cp data.py-dist data.py
3033
- name: Create a dummy vm_data.py
3134
run: cp vm_data.py-dist vm_data.py
32-
- run: pyright .
35+
- run: prek -a pyright
3336

3437
ruff:
3538
runs-on: ubuntu-latest
@@ -42,7 +45,7 @@ jobs:
4245
- uses: ./.github/actions/uv-setup/
4346
- name: Create a dummy data.py
4447
run: cp data.py-dist data.py
45-
- run: ruff check
48+
- run: prek -a ruff
4649

4750
flake8:
4851
runs-on: ubuntu-latest
@@ -51,4 +54,4 @@ jobs:
5154
with:
5255
persist-credentials: false
5356
- uses: ./.github/actions/uv-setup/
54-
- run: flake8
57+
- run: prek -a flake8

0 commit comments

Comments
 (0)