Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
env:
FAST: ${{ startsWith(matrix.python-version, 'pypy') && '1' || '' }}
run: |
just --set python ${{ startsWith(matrix.python-version, 'pypy') && matrix.python-version || format('python{0}', matrix.python-version) }} cov
just python=${{ startsWith(matrix.python-version, 'pypy') && matrix.python-version || format('python{0}', matrix.python-version) }} covcleanup="false" cov

- name: Upload coverage data
uses: actions/upload-artifact@v4
Expand Down
26 changes: 24 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
python := ""
covcleanup := "true"

lint:
uv run -p python3.13 --group lint ruff check src/ tests bench
Expand All @@ -7,9 +8,30 @@ lint:
test *args="-x --ff -n auto tests":
uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test pytest {{args}}

testall:
just python=python3.9 test
just python=python3.10 test
just python=python3.11 test
just python=python3.12 test
just python=python3.13 test
just python=pypy3.9 test

cov *args="-x --ff -n auto tests":
@uv run {{ if python != '' { '-p ' + python } else { '' } }} python -c 'import pathlib, site; pathlib.Path(f"{site.getsitepackages()[0]}/cov.pth").write_text("import coverage; coverage.process_startup()")'
COVERAGE_PROCESS_START={{justfile_directory()}}/pyproject.toml uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test coverage run -m pytest {{args}}
uv run {{ if python != '' { '-p ' + python } else { '' } }} --all-extras --group test coverage run -m pytest {{args}}
{{ if covcleanup == "true" { "uv run coverage combine" } else { "" } }}
{{ if covcleanup == "true" { "uv run coverage report" } else { "" } }}
{{ if covcleanup == "true" { "@rm .coverage*" } else { "" } }}

covall:
just python=python3.9 covcleanup=false cov
just python=python3.10 covcleanup=false cov
just python=python3.11 covcleanup=false cov
just python=python3.12 covcleanup=false cov
just python=python3.13 covcleanup=false cov
just python=pypy3.10 covcleanup=false cov
uv run coverage combine
uv run coverage report
@rm .coverage*

bench-cmp:
uv run pytest bench --benchmark-compare
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ addopts = "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warm
parallel = true
source_pkgs = ["cattrs", "tests"]
core = "sysmon"
patch = ["subprocess"]

[tool.coverage.report]
show_missing = true
Expand Down
Loading