Skip to content

Commit b5b5fbd

Browse files
committed
fix: CI script
1 parent 9dbc5f3 commit b5b5fbd

3 files changed

Lines changed: 31 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ on:
44
- push
55

66
jobs:
7-
test:
8-
name: Test and lint source
7+
lint:
8+
name: Lint source
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v2
13-
- name: Set up Python 38
13+
- name: Set up Python
1414
uses: actions/setup-python@v2
1515
with:
16-
python-version: "3.8"
16+
python-version: "3.12"
1717
- name: Setup packages
1818
run: |
1919
pip install -U pip setuptools wheel
20-
pip install -r requirements-dev.txt codecov
20+
pip install -r requirements-dev.txt
2121
- name: Lint
2222
run: |
2323
flake8
@@ -26,6 +26,25 @@ jobs:
2626
black --check src
2727
isort --diff src
2828
isort --check src
29+
30+
test:
31+
name: Test (Python ${{ matrix.python-version }})
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
- name: Set up Python ${{ matrix.python-version }}
40+
uses: actions/setup-python@v2
41+
with:
42+
python-version: "${{ matrix.python-version }}"
43+
allow-prereleases: true
44+
- name: Setup packages
45+
run: |
46+
pip install -U pip setuptools wheel
47+
pip install -r requirements-dev.txt codecov
2948
- name: Test
3049
run: |
3150
pytest --cov --cov-report=xml

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ classifiers =
1212
Programming Language :: Python :: 3.8
1313
Programming Language :: Python :: 3.9
1414
Programming Language :: Python :: 3.10
15+
Programming Language :: Python :: 3.11
16+
Programming Language :: Python :: 3.12
17+
Programming Language :: Python :: 3.13
18+
Programming Language :: Python :: 3.14
1519

1620
[options]
1721
zip_safe = False

src/jsonie/tests/test_to_jsonic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,11 @@ def test_pytyped_jsonic_data_to_jsonic_fail(input):
487487
[
488488
(
489489
{"a": 12, "b": 456.0},
490-
(typing.TypedDict("foo", a=int, b=float), {"a": 12.123, "b": 456}), # type: ignore
490+
(typing.TypedDict("foo", {"a": int, "b": float}), {"a": 12.123, "b": 456}), # type: ignore
491491
),
492492
(
493493
{"a": 1.5, "b": {"c": 5}},
494-
(typing.TypedDict("foo", a=float, b=typing.TypedDict("bar", c=int)), {"a": 1.5, "b": {"c": 5.0}}), # type: ignore
494+
(typing.TypedDict("foo", {"a": float, "b": typing.TypedDict("bar", {"c": int})}), {"a": 1.5, "b": {"c": 5.0}}), # type: ignore
495495
),
496496
],
497497
)
@@ -619,6 +619,7 @@ def test_nested_dataclass_with_sequence(self):
619619
)
620620
assert result == Qux(items=[Baz(x=1, y="a"), Baz(x=2, y="b")], label="test")
621621

622+
@pytest.mark.skipif(sys.version_info < (3, 10), reason="requires python 3.10 or higher")
622623
def test_self_referencing_dataclass(self):
623624
from ..to_jsonic import ToJsonicConverter
624625
from ._future_annotations_fixtures import SelfRef

0 commit comments

Comments
 (0)