Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/python-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ name: Tests (pull_request)
on:
pull_request:

permissions: {}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.x"

Expand All @@ -33,4 +35,4 @@ jobs:
run: python -m build -s -w

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
11 changes: 9 additions & 2 deletions .github/workflows/python-tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ name: Tests
on:
push:

permissions: {}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Get branch name (merge)
if: github.event_name != 'pull_request'
Expand All @@ -21,7 +28,7 @@ jobs:
>> $GITHUB_ENV

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# https://docs.zizmor.sh/integrations/#github-actions
name: Zizmor (GitHub Actions Security)

on:
push:
paths:
- '.github/workflows/**'
pull_request:
paths:
- '.github/workflows/**'

permissions: {}

concurrency:
group: zizmor-${{ github.ref }}
cancel-in-progress: true

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
contents: read # Required for private repos
actions: read # Required for private repos
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Run zizmor
uses: zizmorcore/zizmor-action@6599ee8b7a49aef6a770f63d261d214911a7ce02 # v0.6.0
with:
advanced-security: false
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ repos:
files: '^(src/.*|tests/.*)\.py$'
additional_dependencies:
- pytest>=7
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.28.0
hooks:
- id: zizmor