Skip to content

Commit d08d16c

Browse files
authored
Merge branch 'main' into patch-5
2 parents 9be61ec + ab218f3 commit d08d16c

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
pull_request:
1010

1111
concurrency:
12-
group: ci-main-${{ github.ref }}
12+
group: ${{ github.workflow }}-${{ github.ref }}
1313
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1414

1515
env:
@@ -25,6 +25,9 @@ jobs:
2525
timeout-minutes: 15
2626
permissions:
2727
contents: read
28+
security-events: write
29+
env:
30+
TOXENV: ${{ matrix.name }}
2831
steps:
2932
- uses: actions/checkout@v4
3033
with:
@@ -53,7 +56,14 @@ jobs:
5356
pip install tox==4.26.0
5457
5558
- name: Run tox
56-
run: tox -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
5767

5868
- name: Report coverage
5969
if: contains(matrix.name, 'coverage')

.github/zizmor.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules:
2+
unpinned-uses:
3+
config:
4+
policies:
5+
actions/*: ref-pin
6+
codecov/codecov-action: ref-pin
7+
github/*: ref-pin

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ _build
1818
*.egg
1919
# autogenerated by setuptools-scm
2020
/pytest_django/_version.py
21+
zizmor.sarif

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ xdist = [
6363
"pytest-xdist",
6464
]
6565
linting = [
66-
"ruff==0.9.5",
6766
"mypy==1.15.0",
67+
"ruff==0.9.5",
68+
"zizmor==1.9.0",
6869
]
6970
[project.urls]
7071
Documentation = "https://pytest-django.readthedocs.io/"

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ commands =
4848
ruff check --diff {posargs:pytest_django pytest_django_test tests}
4949
ruff format --quiet --diff {posargs:pytest_django pytest_django_test tests}
5050
mypy {posargs:pytest_django pytest_django_test tests}
51+
python -c "import subprocess, sys; sys.exit(subprocess.call('zizmor --persona=pedantic --format sarif .github/workflows/deploy.yml .github/workflows/main.yml > zizmor.sarif', shell=True))"
5152

5253
[testenv:doc8]
5354
basepython = python3

0 commit comments

Comments
 (0)