Skip to content
Open
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
31 changes: 31 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: checks

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
poetry-check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Poetry
run: pipx install poetry==2.4.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Validate pyproject.toml
run: poetry check
- name: Validate poetry.lock is in sync
run: poetry check --lock
37 changes: 37 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: lints

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Poetry
run: pipx install poetry==2.4.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
cache: poetry
- name: Install dev dependencies
run: poetry install --with dev
- name: black
run: poetry run black --check src/ tests/ example/
- name: isort
run: poetry run isort --check-only src/ tests/ example/
- name: flake8
continue-on-error: true
run: poetry run flake8 src/
43 changes: 43 additions & 0 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Attach artifacts to GitHub release

on:
release:
types: [published]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
attach:
name: Build, attest, and attach to release
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write # upload assets to the GitHub release
id-token: write # required by attest-build-provenance
attestations: write # write to GitHub Attestations API
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Poetry
run: pipx install poetry==2.4.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
cache: poetry
- name: Build sdist and wheel
run: poetry build
- name: Generate build provenance attestation
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
with:
subject-path: 'dist/*'
- name: Upload distributions to GitHub release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" dist/*
74 changes: 74 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Publish to PyPI

on:
release:
types: [published]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Poetry
run: pipx install poetry==2.4.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
cache: poetry
- name: Build sdist and wheel
run: poetry build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: python-package-distributions
path: dist/

publish-to-testpypi:
name: Publish to TestPyPI
if: github.event.release.prerelease == true
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: testpypi
url: https://test.pypi.org/p/pysaml2
permissions:
id-token: write # Trusted Publishing OIDC + auto-generated PEP 740 attestations
attestations: write # GitHub Attestations API
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/

publish-to-pypi:
name: Publish to PyPI
if: github.event.release.prerelease == false
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: pypi
url: https://pypi.org/p/pysaml2
permissions:
id-token: write
attestations: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: tests

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install xmlsec1
run: |
sudo apt-get update
sudo apt-get install -y xmlsec1
xmlsec1 --version
- name: Install Poetry
run: pipx install poetry==2.4.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install --with test,coverage
- name: Run tests
run: poetry run pytest --import-mode=importlib --cov=saml2 --cov-report=term-missing
29 changes: 29 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: zizmor

on:
push:
branches: [master]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
zizmor:
name: Audit GitHub Actions workflows
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install zizmor
run: pipx install zizmor==1.24.1
- name: Run zizmor
run: zizmor ./.github
env:
GH_TOKEN: ${{ github.token }}
102 changes: 0 additions & 102 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Unreleased (2026-XX-XX)

- ci: Migrate from Travis CI to GitHub Actions
- ci: Add `tests` workflow with a Python 3.9–3.14 matrix
- ci: Add `lint` workflow (black, isort, flake8) and `checks` workflow (`poetry check` + lockfile validation)
- ci: Publish to PyPI/TestPyPI via Trusted Publishing with attestations
- ci: Attach build artifacts and provenance attestations to GitHub releases
- ci: Add `zizmor` workflow to audit GitHub Actions for security issues
- docs: Update RELEASE.md with the `gh release create` flow

## v7.5.4 (2025-10-07)

Expand Down
Loading