Skip to content

Commit

Permalink
ci: add nox dependency group
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Nov 18, 2024
1 parent 32bfd1c commit 063b22f
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 7 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
with:
python-version-file: ".python-version"

- name: Install the project
run: uv sync --group nox

- uses: pre-commit/action@v3.0.1
with:
extra_args: --hook-stage manual --all-files
Expand All @@ -53,9 +56,9 @@ jobs:
python-version: ["3.10", "3.12"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

include:
- python-version: pypy-3.10
runs-on: ubuntu-latest
# include:
# - python-version: pypy-3.10
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -110,12 +113,12 @@ jobs:
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --extra all --group test --resolution lowest-direct
run: uv sync --group test --resolution lowest-direct

- name: Test package
run: >-
uv run pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20 --mpl
--durations=20
- name: Upload coverage report
uses: codecov/codecov-action@v4.6.0
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ classifiers = [
dynamic = ["version"]
dependencies = [
"plum-dispatch>=2.5.1",
"typing_extensions",
"typing_extensions>=4.12.2",
]

[project.urls]
Expand All @@ -41,8 +41,10 @@ build-backend = "hatchling.build"

[dependency-groups]
dev = [
{ "include-group" = "nox" },
{ "include-group" = "test" },
]
nox = ["nox"]
test = [
"attrs",
"pytest >=6",
Expand Down
86 changes: 85 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 063b22f

Please sign in to comment.