From 4269a178cc19cc73b0c14d1daf262f6abb1ecd0e Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Mon, 11 May 2026 22:59:17 +0100 Subject: [PATCH] add zizmor to ci --- .github/workflows/tests.yml | 48 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1688b39e..e444cf5c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,25 @@ name: build -on: [push, pull_request, workflow_dispatch] +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: {} + jobs: lint: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: 3.14 - run: python -m pip install --upgrade pip wheel tox - run: tox -eflake8 - run: tox -edocs @@ -19,8 +32,10 @@ jobs: fail-fast: false runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python }} - run: python -m pip install --upgrade pip wheel tox @@ -29,12 +44,29 @@ jobs: name: coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 + with: + python-version: 3.14 - run: python -m pip install --upgrade pip wheel tox - run: tox - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 with: files: ./coverage.xml fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + zizmor: + name: zizmor + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 + with: + advanced-security: false