Skip to content

Commit bd74cb4

Browse files
committed
Try to simplify some of the CI and add support for Python 3.13
1 parent a4d1941 commit bd74cb4

File tree

5 files changed

+27
-63
lines changed

5 files changed

+27
-63
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33
name: CI
44

5-
on: [push, pull_request]
5+
on: [ push, pull_request ]
66

77
jobs:
88
ci:
99
strategy:
1010
matrix:
11-
os: [ubuntu-latest, macos-latest, windows-latest]
12-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
11+
os: [ ubuntu-latest, macos-latest, windows-latest ]
12+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
1313
fail-fast: false
1414
runs-on: ${{ matrix.os }}
1515
steps:
@@ -22,6 +22,7 @@ jobs:
2222
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
2323
with:
2424
python-version: ${{ matrix.python-version }}
25+
allow-prereleases: true
2526
- name: Install python prerequisites
2627
run: pip install -U --user pip setuptools setuptools-scm nox
2728
- name: Run tests and post coverage results

.github/workflows/doc.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,23 @@
22
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33
name: Doc
44

5-
on: [push, pull_request]
5+
on: [ push, pull_request, workflow_dispatch ]
66

77
permissions:
88
contents: read
99

1010
jobs:
11-
doc:
12-
strategy:
13-
matrix:
14-
os: [ubuntu-latest]
15-
python-version: ["3.12"]
16-
fail-fast: false
17-
runs-on: ${{ matrix.os }}
11+
build_docs:
12+
runs-on: ubuntu-latest
1813
steps:
1914
- uses: actions/checkout@v4 # https://github.com/actions/checkout
15+
- uses: actions/setup-python@v5
2016
with:
17+
python-version: 3.13
18+
allow-prereleases: true
2119
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
2220
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2321
fetch-depth: 0 # Needed for setuptools_scm to work correctly
24-
- name: Set up Python
25-
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install python prerequisites
29-
run: pip install -U --user pip setuptools setuptools-scm nox
30-
- name: Sphinx documentation build
31-
run: python -m nox --non-interactive --session docs
22+
- run: pip install --upgrade pip
23+
- run: pip install -r docs/requirements.txt
24+
- run: sphinx-build -c docs . docs/_build/html

.github/workflows/format.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,13 @@ permissions:
88
contents: read
99

1010
jobs:
11-
lint:
12-
strategy:
13-
matrix:
14-
os: [ ubuntu-latest ]
15-
python-version: [ "3.12" ]
16-
fail-fast: false
17-
runs-on: ${{ matrix.os }}
11+
format:
12+
runs-on: ubuntu-latest
1813
steps:
1914
- uses: actions/checkout@v4 # https://github.com/actions/checkout
2015
with:
2116
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
2217
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2318
fetch-depth: 0 # Needed for setuptools_scm to work correctly
24-
- name: Set up Python
25-
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install python prerequisites
29-
run: pip install -U --user ruff
30-
- name: Ruff format
31-
run: ruff format --check
19+
- run: pip install --user ruff
20+
- run: ruff format --check

.github/workflows/lint.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,12 @@ permissions:
99

1010
jobs:
1111
lint:
12-
strategy:
13-
matrix:
14-
os: [ ubuntu-latest ]
15-
python-version: [ "3.12" ]
16-
fail-fast: false
17-
runs-on: ${{ matrix.os }}
12+
runs-on: ubuntu-latest
1813
steps:
1914
- uses: actions/checkout@v4 # https://github.com/actions/checkout
2015
with:
2116
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
2217
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2318
fetch-depth: 0 # Needed for setuptools_scm to work correctly
24-
- name: Set up Python
25-
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install python prerequisites
29-
run: pip install -U --user ruff
30-
- name: Ruff lint
31-
run: ruff check
19+
- run: pip install --user ruff
20+
- run: ruff check --output-format=github .

.github/workflows/mypy.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,22 @@
22
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33
name: MyPy
44

5-
on: [push, pull_request]
5+
on: [ push, pull_request ]
66

77
permissions:
88
contents: read
99

1010
jobs:
1111
mypy:
12-
strategy:
13-
matrix:
14-
os: [ubuntu-latest]
15-
python-version: ["3.12"]
16-
fail-fast: false
17-
runs-on: ${{ matrix.os }}
12+
runs-on: ubuntu-latest
1813
steps:
1914
- uses: actions/checkout@v4 # https://github.com/actions/checkout
15+
- uses: actions/setup-python@v5 # https://github.com/actions/setup-python
2016
with:
17+
python-version: 3.13
18+
allow-prereleases: true
2119
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
2220
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2321
fetch-depth: 0 # Needed for setuptools_scm to work correctly
24-
- name: Set up Python
25-
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install python prerequisites
29-
run: pip install -U --user pip setuptools setuptools-scm nox
30-
- name: MyPy
31-
run: python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k mypy # Run nox for mypy
22+
- run: pip install -U --user pip setuptools setuptools-scm nox
23+
- run: python -m nox --non-interactive --session validate-${{ python-version }} -k mypy # Run nox for mypy

0 commit comments

Comments
 (0)