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
75 changes: 75 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/ci.yml':
- 'actions/checkout@v6.0.2'
- 'actions/setup-python@v6.2.0'
'.github/workflows/lint.yml':
- 'actions/checkout@v6.0.2'
- 'actions/setup-python@v6.2.0'
- 'j178/prek-action@v3.0.1'
'.github/workflows/pypi.yml':
- 'actions/checkout@v6.0.2'
- 'actions/download-artifact@v8.0.1'
- 'actions/setup-python@v6.2.0'
- 'actions/upload-artifact@v7.0.1'
- 'pypa/gh-action-pypi-publish@v1.14.0'
- 'sigstore/gh-action-sigstore-python@v3.3.0'
dependencies:
'actions/checkout@v6.0.2':
ref: 'v6.0.2'
commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd'
owner_id: 44036562
repo_id: 197814629
'actions/download-artifact@v8.0.1':
ref: 'v8.0.1'
commit: 'sha1-3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c'
owner_id: 44036562
repo_id: 192626254
'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065':
ref: 'v5.6.0'
commit: 'sha1-a26af69be951a213d495a4c3e4e4022e16d87065'
owner_id: 44036562
repo_id: 192625525
'actions/setup-python@v6.2.0':
ref: 'v6.2.0'
commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
owner_id: 44036562
repo_id: 192625525
'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f':
ref: 'v7.0.0'
commit: 'sha1-bbbca2ddaa5d8feaa63e36b76fdaad77386f024f'
owner_id: 44036562
repo_id: 192625955
'actions/upload-artifact@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-043fb46d1a93c77aae656e7c1c64a875d1fc6a0a'
owner_id: 44036562
repo_id: 192625955
'j178/prek-action@v3.0.1':
ref: 'v3.0.1'
commit: 'sha1-1382ad72dea72f9d53832f2bcb65b3e87a947204'
owner_id: 10510431
repo_id: 1052387486
'pypa/gh-action-pypi-publish@v1.14.0':
ref: 'v1.14.0'
commit: 'sha1-cef221092ed1bacb1cc03d23a2d87d1d172e277b'
owner_id: 647025
repo_id: 178055147
uses:
- 'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065'
'sigstore/gh-action-sigstore-python@v3.3.0':
ref: 'v3.3.0'
commit: 'sha1-04cffa1d795717b140764e8b640de88853c92acc'
owner_id: 71096353
repo_id: 508560980
uses:
- 'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f'
- 'softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe'
'softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe':
ref: 'v2.6.1'
commit: 'sha1-153bb8e04406b158c6c84fc1615b65b24149a1fe'
owner_id: 2242
repo_id: 204253808
35 changes: 29 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,34 @@ name: ci
branches:
- main

permissions:
contents: read

jobs:
lockfile:
runs-on: ubuntu-slim
timeout-minutes: 10
steps:
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- name: Verify workflow lockfile
env:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install github/gh-actions-lock --pin v0.4.1
gh actions-lock --verify

test:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python_version }}
cache: pip
Expand All @@ -29,8 +48,10 @@ jobs:
long_test_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: 3.13
cache: pip
Expand All @@ -44,8 +65,10 @@ jobs:
long_test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: 3.13
cache: pip
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ name: lint
branches:
- main

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@v6.2.0
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: python -m pip install ".[test]"
- uses: j178/prek-action@1382ad72dea72f9d53832f2bcb65b3e87a947204 # v3.0.1
- uses: j178/prek-action@v3.0.1
19 changes: 11 additions & 8 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ on:
tags:
- 'v*.*.*'

permissions:
contents: read

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@v6.2.0
with:
python-version: "3.x"
- name: Install pypa/build
Expand All @@ -27,7 +30,7 @@ jobs:
run: |
python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.0
uses: actions/upload-artifact@v7.0.1
with:
name: python-package-distributions
path: dist/
Expand All @@ -46,12 +49,12 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
uses: actions/download-artifact@v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b #v1.14.0
uses: pypa/gh-action-pypi-publish@v1.14.0

github-release:
name: >-
Expand All @@ -67,12 +70,12 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
uses: actions/download-artifact@v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0
uses: sigstore/gh-action-sigstore-python@v3.3.0
with:
inputs: >-
./dist/*.tar.gz
Expand All @@ -94,4 +97,4 @@ jobs:
run: >-
gh release upload
"$GITHUB_REF_NAME" dist/**
--repo "$GITHUB_REPOSITORY"
--repo "$GITHUB_REPOSITORY"
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ repos:
- id: ruff-format
args: [--exit-non-zero-on-fix]

- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: 06a39750ec31860bb44f2acf67182c40016cd1e7 # frozen: v1.32.0
hooks:
- id: zizmor
args: [--offline, --strict-collection, .github]
pass_filenames: false
files: ^\.github/
types: [file] # Include actions.lock.
stages: [pre-commit]

- repo: local
hooks:
- id: pyright
Expand Down
6 changes: 6 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ prek install
prek run --all-files
```

The hooks include zizmor checks for `.github`.

After changing action references or adding workflows under `.github/workflows`,
run `gh actions-lock` and commit the updated lockfile with the workflow changes.
This requires the [gh-actions-lock extension](https://github.com/github/gh-actions-lock).

## The workflows

There is a single user-facing workflow, `benchmark.yml`, that [reuses](https://docs.github.com/en/actions/using-workflows/reusing-workflows) the other workflows, prefixed with `_`.
Expand Down
Loading