Bumps the github-actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package) | `2.14.0` | `2.17.0` | | [hynek/setup-cached-uv](https://github.com/hynek/setup-cached-uv) | `2.3.0` | `2.5.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `7.0.0` | `7.0.1` | | [github/codeql-action](https://github.com/github/codeql-action) | `4.32.4` | `4.35.2` | | [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) | `1.13.0` | `1.14.0` | Updates `hynek/build-and-inspect-python-package` from 2.14.0 to 2.17.0 - [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases) - [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md) - [Commits](efb823f521...fe0a0fb192) Updates `hynek/setup-cached-uv` from 2.3.0 to 2.5.0 - [Release notes](https://github.com/hynek/setup-cached-uv/releases) - [Changelog](https://github.com/hynek/setup-cached-uv/blob/main/CHANGELOG.md) - [Commits](757bedc3f9...4300ec2180) Updates `actions/upload-artifact` from 7.0.0 to 7.0.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](bbbca2ddaa...043fb46d1a) Updates `github/codeql-action` from 4.32.4 to 4.35.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](89a39a4e59...95e58e9a2c) Updates `pypa/gh-action-pypi-publish` from 1.13.0 to 1.14.0 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](ed0c53931b...cef221092e) --- updated-dependencies: - dependency-name: hynek/build-and-inspect-python-package dependency-version: 2.17.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: hynek/setup-cached-uv dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action dependency-version: 4.35.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
266 lines
7.7 KiB
YAML
266 lines
7.7 KiB
YAML
---
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["*"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FORCE_COLOR: "1" # Make tools pretty.
|
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
PIP_NO_PYTHON_VERSION_WARNING: "1"
|
|
|
|
permissions: {}
|
|
|
|
|
|
jobs:
|
|
build-package:
|
|
name: Build & verify package
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0
|
|
id: baipp
|
|
|
|
outputs:
|
|
# Used to define the matrix for tests below. The value is based on
|
|
# packaging metadata (trove classifiers).
|
|
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
|
|
|
|
|
|
tests:
|
|
name: Tests & Mypy API on ${{ matrix.python-version }}
|
|
runs-on: ubuntu-latest
|
|
needs: build-package
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Created by the build-and-inspect-python-package action above.
|
|
python-version: ${{ fromJson(needs.build-package.outputs.python-versions) }}
|
|
|
|
env:
|
|
PYTHON: ${{ matrix.python-version }}
|
|
|
|
steps:
|
|
- name: Download pre-built packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
- run: |
|
|
tar xf dist/*.tar.gz --strip-components=1
|
|
rm -rf src
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
allow-prereleases: true
|
|
- uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
|
|
|
|
- name: Run tests
|
|
run: >
|
|
uvx --with tox-uv tox run
|
|
--installpkg dist/*.whl
|
|
-f py${PYTHON//./}-tests
|
|
|
|
- name: Upload coverage data
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: coverage-data-${{ matrix.python-version }}
|
|
path: .coverage.*
|
|
include-hidden-files: true
|
|
if-no-files-found: ignore
|
|
|
|
- name: Check public API with Mypy
|
|
run: >
|
|
uvx --with tox-uv tox run
|
|
--installpkg dist/*.whl
|
|
-e py${PYTHON//./}-mypy
|
|
|
|
free-threading:
|
|
name: Test free-threaded builds on ${{ matrix.python-version }}
|
|
runs-on: ubuntu-latest
|
|
needs: build-package
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version:
|
|
- 3.14t
|
|
env:
|
|
PYTHON: ${{ matrix.python-version }}
|
|
|
|
steps:
|
|
- name: Download pre-built packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
- run: |
|
|
tar xf dist/*.tar.gz --strip-components=1
|
|
rm -rf src
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
allow-prereleases: true
|
|
- uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
|
|
|
|
- name: Run tests
|
|
run: |
|
|
uv venv --python $PYTHON
|
|
# cffi 2 is required and currently beta.
|
|
uv pip install --prerelease=allow dist/*.whl --group dev
|
|
|
|
.venv/bin/python -Im pytest tests
|
|
|
|
|
|
coverage:
|
|
name: Ensure 100% test coverage
|
|
runs-on: ubuntu-latest
|
|
needs: tests
|
|
if: always()
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version-file: .python-version-default
|
|
- uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
|
|
|
|
- name: Download coverage data
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
pattern: coverage-data-*
|
|
merge-multiple: true
|
|
|
|
- name: Combine coverage and fail if it's <100%.
|
|
run: |
|
|
uv tool install coverage
|
|
|
|
coverage combine
|
|
coverage html --skip-covered --skip-empty
|
|
|
|
# Report and write to summary.
|
|
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
|
|
|
|
# Report again and fail if under 100%.
|
|
coverage report --fail-under=100
|
|
|
|
- name: Upload HTML report if check failed.
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: html-report
|
|
path: htmlcov
|
|
if: ${{ failure() }}
|
|
|
|
|
|
system-package:
|
|
name: Install & test with system package of Argon2
|
|
runs-on: ubuntu-latest
|
|
needs: build-package
|
|
|
|
steps:
|
|
- name: Download pre-built packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version-file: .python-version-default
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install libargon2-1 libargon2-dev
|
|
python -VV
|
|
python -Im site
|
|
python -Im pip install --upgrade tox
|
|
|
|
- run: python -Im tox run -e system-argon2
|
|
|
|
typing:
|
|
name: Check types using supported type checkers
|
|
runs-on: ubuntu-latest
|
|
needs: build-package
|
|
|
|
steps:
|
|
- name: Download pre-built packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version-file: .python-version-default
|
|
- uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
|
|
|
|
- run: uvx --with tox-uv tox run -f typing
|
|
|
|
docs:
|
|
name: Run doctests
|
|
needs: build-package
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download pre-built packages
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
- run: tar xf dist/*.tar.gz --strip-components=1
|
|
- uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0
|
|
|
|
- run: >
|
|
uvx --with tox-uv
|
|
tox run -e docs-doctests
|
|
|
|
|
|
install-dev:
|
|
name: Verify dev env
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version-file: .python-version-default
|
|
|
|
- name: Install in dev mode and run CLI
|
|
run: |
|
|
python -Im pip install -e . --group dev
|
|
python -Im argon2 -n 1 -t 1 -m 8 -p 1
|
|
|
|
|
|
required-checks-pass:
|
|
if: always()
|
|
name: Ensure everything required is passing for branch protection
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- coverage
|
|
- typing
|
|
- docs
|
|
- install-dev
|
|
- system-package
|
|
|
|
steps:
|
|
- name: Decide whether the needed jobs succeeded or failed
|
|
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
|
with:
|
|
jobs: ${{ toJSON(needs) }}
|