From 83952ac60979433e2bc52ef86aac6b395ec9fc1e Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Tue, 25 Jun 2024 18:38:31 +0200 Subject: [PATCH] ci: use hatch in ci --- .github/workflows/ci.yml | 16 ++++++++-------- pyproject.toml | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a84981..351a476 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,28 +10,28 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{matrix.python-version}} architecture: x64 - - run: pip install nox==2022.11.21 - - run: pip install poetry==1.2.2 - - run: nox --session mypy-${{matrix.python-version}} + allow-prereleases: true + - run: pip install hatch + - run: hatch run +py=${{matrix.python-version}} mypy:test test: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{matrix.python-version}} architecture: x64 - - run: pip install nox==2022.11.21 - - run: pip install poetry==1.2.2 - - run: nox --sessions test-${{matrix.python-version}} + allow-prereleases: true + - run: pip install hatch + - run: hatch test -py ${{matrix.python-version}} diff --git a/pyproject.toml b/pyproject.toml index 707dc1a..38e96e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,14 @@ extra-dependencies = [ [[tool.hatch.envs.hatch-test.matrix]] python=['3.8',"3.9","3.10","3.11","3.12","3.13"] + +[[tool.hatch.envs.mypy.matrix]] +python=['3.8',"3.10","3.11","3.12","3.13"] + +[tool.hatch.envs.mypy] +extra-dependencies=["mypy"] +scripts.test = ["mypy src"] + [tool.hatch.envs.docs] dependencies = [ "mkdocs>=1.4.2",