Skip to content

Commit

Permalink
ci: faster with uv (#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Oct 2, 2024
1 parent 4fe905b commit 981e80b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- uses: astral-sh/setup-uv@v3

- name: Install package
run: python -m pip install -e .[test]
run: uv pip install --system -e .[test]

- name: Test package
run: python -m pytest --doctest-modules --cov=src/hepunits --cov-report=xml
Expand Down
5 changes: 4 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import nox

nox.needs_version = ">=2024.4.15"
nox.options.default_venv_backend = "uv|virtualenv"


@nox.session
def lint(session: nox.Session) -> None:
Expand All @@ -15,5 +18,5 @@ def tests(session: nox.Session) -> None:
"""
Run the unit and regular tests.
"""
session.install(".[test]")
session.install("-e.[test]")
session.run("pytest", *session.posargs)

0 comments on commit 981e80b

Please sign in to comment.