From 60d3024b22eda0ac5c9090928c4e0ae396083fab Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Wed, 7 Feb 2024 08:45:52 +0100 Subject: [PATCH] ci: fix ci --- .github/workflows/ci.yml | 15 +++++++-------- pyproject.toml | 12 ++++++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4a84aa..6e696d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,9 @@ jobs: with: python-version: ${{matrix.python-version}} architecture: x64 - - run: pip install nox==2023.4.22 - - run: pip install poetry nox-poetry - - run: nox --session mypy-${{matrix.python-version}} + - run: | + pip install hatch + hatch run -python=${{matrix.python-version}} mypy:test test: runs-on: ${{matrix.os}} @@ -33,16 +33,15 @@ jobs: with: python-version: ${{matrix.python-version}} architecture: x64 - - run: pip install hatch - - run: pip install poetry nox-poetry - - run: hatch +python=${{matrix.python-version}} test-cov + - run: | + pip install hatch + hatch run +python=${{matrix.python-version}} all:test-cov - name: Combine data env: TOP: ${{github.workspace}} run: | - poetry install - poetry run coverage combine + pip install hatch mv .coverage .coverage.${{ matrix.python-version }}.${{matrix.os}} - name: Upload coverage data diff --git a/pyproject.toml b/pyproject.toml index d6f3649..fd7b66d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -130,3 +130,15 @@ scripts.serve = ["mkdocs serve {args}"] [tool.hatch.version] path = "src/lazy_imports_lite/__init__.py" + + + + +[tool.hatch.envs.mypy] +dependencies = [ + "mypy", +] +scripts.test = "mypy src tests" + +[[tool.hatch.envs.mypy.matrix]] +python = ["3.8", "3.9", "3.10", "3.11", "3.12"]