Skip to content

Commit 30024d4

Browse files
committed
Python 3.13 support + update locked dependencies + coverallsapp/github-action
Coveralls is stuck with <3.13, but it's only used to report the collected values, then use their new coverallsapp/github-action instead, it will run on its own python container, whatever version/deps it needs. This allows us to run on 3.13, which will be the primary development version from now on. Then update the poetry-locked dependencies to their newest versions. GitHub action: do not check 3.8 since it's EOL and newest black is incompatible. Fixes: #247
1 parent 24ab4b1 commit 30024d4

File tree

6 files changed

+279
-196
lines changed

6 files changed

+279
-196
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
if: github.event.pull_request.draft != true
2121
strategy:
2222
matrix:
23-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
23+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2424

2525
steps:
2626
- uses: actions/checkout@v4
2727
- name: "Install Poetry"
2828
run: "pip install poetry"
2929
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v4
30+
uses: actions/setup-python@v5
3131
with:
3232
python-version: ${{ matrix.python-version }}
3333
cache: poetry
@@ -41,6 +41,18 @@ jobs:
4141
- name: "Run pre-commit"
4242
run: poetry run pre-commit run --show-diff-on-failure --color=always --hook-stage push --all-files
4343
- name: Coveralls
44-
run: poetry run coveralls --service=github
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
uses: coverallsapp/github-action@v2
45+
with:
46+
flag-name: build-${{ matrix.python-version }}
47+
parallel: true
48+
49+
finish:
50+
needs: build
51+
if: ${{ always() }}
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Coveralls Finished
55+
uses: coverallsapp/github-action@v2
56+
with:
57+
parallel-finished: true
58+
carryforward: "build-3.9,build-3.10,build-3.11,build-3.12,build-3.13"

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ default_install_hook_types: [pre-commit, pre-push, pre-merge-commit]
55

66
repos:
77
- repo: https://github.com/python/black
8-
rev: 24.8.0
8+
rev: 25.1.0
99
hooks:
1010
- id: black
1111
exclude: "^(docs/|examples/.*(schema|operations)[.]py)"
1212

1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.6.0
14+
rev: v5.0.0
1515
hooks:
1616
- id: check-shebang-scripts-are-executable
1717
- id: check-merge-conflict
@@ -24,7 +24,7 @@ repos:
2424
- id: trailing-whitespace
2525

2626
- repo: https://github.com/pycqa/flake8
27-
rev: 7.1.1
27+
rev: 7.2.0
2828
hooks:
2929
- id: flake8
3030
additional_dependencies:
@@ -55,15 +55,15 @@ repos:
5555
pass_filenames: false
5656
always_run: true
5757
types: [python]
58-
stages: [push, merge-commit]
58+
stages: [pre-push, pre-merge-commit]
5959

6060
- id: check-release
6161
name: check-release
6262
entry: poetry build
6363
language: system
6464
pass_filenames: false
6565
always_run: true
66-
stages: [push, merge-commit]
66+
stages: [pre-push, pre-merge-commit]
6767

6868
- id: test-github-example
6969
name: Test GitHub example
@@ -72,7 +72,7 @@ repos:
7272
pass_filenames: false
7373
always_run: true
7474
types: [python]
75-
stages: [push, merge-commit]
75+
stages: [pre-push, pre-merge-commit]
7676

7777
- id: test-shopify-example
7878
name: Test Shopify example
@@ -81,4 +81,4 @@ repos:
8181
pass_filenames: false
8282
always_run: true
8383
types: [python]
84-
stages: [push, merge-commit]
84+
stages: [pre-push, pre-merge-commit]

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ formats: all
44
build:
55
os: ubuntu-24.04
66
tools:
7-
python: '3.12'
7+
python: '3.13'
88
jobs:
99
post_create_environment:
1010
- pip install poetry

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ Run the tests (one of the below):
507507

508508
Keep 100% coverage. You can look at the coverage report at
509509
``cover/index.html``. To do that, prefer
510-
`doctest <https://docs.python.org/3.12/library/doctest.html>`_
510+
`doctest <https://docs.python.org/3.13/library/doctest.html>`_
511511
so it serves as
512512
both documentation and test. However we use
513513
`pytest <https://docs.pytest.org/>`_ to write explicit tests that would be

0 commit comments

Comments
 (0)