Skip to content

Commit

Permalink
Try to simplify some of the CI and add support for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
tleonhardt committed Oct 23, 2024
1 parent a4d1941 commit bd74cb4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 63 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -22,6 +22,7 @@ jobs:
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install python prerequisites
run: pip install -U --user pip setuptools setuptools-scm nox
- name: Run tests and post coverage results
Expand Down
25 changes: 9 additions & 16 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,23 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Doc

on: [push, pull_request]
on: [ push, pull_request, workflow_dispatch ]

permissions:
contents: read

jobs:
doc:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
fail-fast: false
runs-on: ${{ matrix.os }}
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
- uses: actions/setup-python@v5
with:
python-version: 3.13
allow-prereleases: true
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python prerequisites
run: pip install -U --user pip setuptools setuptools-scm nox
- name: Sphinx documentation build
run: python -m nox --non-interactive --session docs
- run: pip install --upgrade pip
- run: pip install -r docs/requirements.txt
- run: sphinx-build -c docs . docs/_build/html
19 changes: 4 additions & 15 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,13 @@ permissions:
contents: read

jobs:
lint:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.12" ]
fail-fast: false
runs-on: ${{ matrix.os }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python prerequisites
run: pip install -U --user ruff
- name: Ruff format
run: ruff format --check
- run: pip install --user ruff
- run: ruff format --check
17 changes: 3 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,12 @@ permissions:

jobs:
lint:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.12" ]
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python prerequisites
run: pip install -U --user ruff
- name: Ruff lint
run: ruff check
- run: pip install --user ruff
- run: ruff check --output-format=github .
22 changes: 7 additions & 15 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,22 @@
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: MyPy

on: [push, pull_request]
on: [ push, pull_request ]

permissions:
contents: read

jobs:
mypy:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
- uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: 3.13
allow-prereleases: true
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install python prerequisites
run: pip install -U --user pip setuptools setuptools-scm nox
- name: MyPy
run: python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k mypy # Run nox for mypy
- run: pip install -U --user pip setuptools setuptools-scm nox
- run: python -m nox --non-interactive --session validate-${{ python-version }} -k mypy # Run nox for mypy

0 comments on commit bd74cb4

Please sign in to comment.