Install only nox and pre-commit in CI
All checks were successful
CI / Tests (test-types) (push) Successful in 2m3s
CI / Tests (test) (push) Successful in 2m6s
CI / Tests (test-with-3.15) (push) Successful in 2m10s
CI / Lint (push) Successful in 2m20s
CI / Tests (test-with-3.13) (push) Successful in 2m21s

The `nox` sessions install `velofy` and its dependencies themselves;
so, a full `uv sync` only duplicated that work.
This commit is contained in:
Alexander Hess 2026-12-03 00:40:02 +01:00
commit 8b5e66d70b
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
2 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,5 @@
name: Set up `velofy` name: Set up `velofy`
description: Install R, `uv`, and `velofy` with its dependencies description: Install R, `uv`, `nox`, and `pre-commit`
runs: runs:
@ -46,6 +46,8 @@ runs:
echo "$HOME/.local/bin" >> "$FORGEJO_PATH" echo "$HOME/.local/bin" >> "$FORGEJO_PATH"
"$HOME/.local/bin/uv" python install $(grep -oP 'Programming Language :: Python :: \K3\.\d+' pyproject.toml) "$HOME/.local/bin/uv" python install $(grep -oP 'Programming Language :: Python :: \K3\.\d+' pyproject.toml)
- name: Install `velofy` and its dependencies # The jobs only use `nox` and `pre-commit` from the develop environment
# => The `nox` sessions install `velofy` and its dependencies themselves
- name: Install `nox` and `pre-commit`
shell: bash shell: bash
run: '"$HOME/.local/bin/uv" sync --locked' run: '"$HOME/.local/bin/uv" sync --locked --only-group dev'

View file

@ -17,6 +17,7 @@ env:
DATABASE_URI: postgresql://user:password@postgres:5432/db DATABASE_URI: postgresql://user:password@postgres:5432/db
GOOGLE_MAPS_API_KEY: AIzaDummyKeyForTests # Fake key to mock the Google API GOOGLE_MAPS_API_KEY: AIzaDummyKeyForTests # Fake key to mock the Google API
R_LIBS: /usr/lib/R/site-library R_LIBS: /usr/lib/R/site-library
UV_NO_SYNC: "1" # Keep `uv run` from installing all groups (see the setup action)
UV_PYTHON_PREFERENCE: only-managed # Only uv's Python has the headers to build `rpy2` UV_PYTHON_PREFERENCE: only-managed # Only uv's Python has the headers to build `rpy2`