Skip to content

Commit 981e80b

Browse files
authored
ci: faster with uv (#215)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 4fe905b commit 981e80b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/main.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ jobs:
4545
python-version: ${{ matrix.python-version }}
4646
allow-prereleases: true
4747

48+
- uses: astral-sh/setup-uv@v3
49+
4850
- name: Install package
49-
run: python -m pip install -e .[test]
51+
run: uv pip install --system -e .[test]
5052

5153
- name: Test package
5254
run: python -m pytest --doctest-modules --cov=src/hepunits --cov-report=xml

noxfile.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import nox
22

3+
nox.needs_version = ">=2024.4.15"
4+
nox.options.default_venv_backend = "uv|virtualenv"
5+
36

47
@nox.session
58
def lint(session: nox.Session) -> None:
@@ -15,5 +18,5 @@ def tests(session: nox.Session) -> None:
1518
"""
1619
Run the unit and regular tests.
1720
"""
18-
session.install(".[test]")
21+
session.install("-e.[test]")
1922
session.run("pytest", *session.posargs)

0 commit comments

Comments
 (0)