From 8b5e66d70b546523077e6c60711d136eef46f990 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Thu, 3 Dec 2026 00:40:02 +0100 Subject: [PATCH] Install only `nox` and `pre-commit` in CI The `nox` sessions install `velofy` and its dependencies themselves; so, a full `uv sync` only duplicated that work. --- .forgejo/actions/setup/action.yaml | 8 +++++--- .forgejo/workflows/ci.yaml | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.forgejo/actions/setup/action.yaml b/.forgejo/actions/setup/action.yaml index c982842..ab6de4b 100644 --- a/.forgejo/actions/setup/action.yaml +++ b/.forgejo/actions/setup/action.yaml @@ -1,5 +1,5 @@ name: Set up `velofy` -description: Install R, `uv`, and `velofy` with its dependencies +description: Install R, `uv`, `nox`, and `pre-commit` runs: @@ -46,6 +46,8 @@ runs: echo "$HOME/.local/bin" >> "$FORGEJO_PATH" "$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 - run: '"$HOME/.local/bin/uv" sync --locked' + run: '"$HOME/.local/bin/uv" sync --locked --only-group dev' diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index 15b23d0..4aca194 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -17,6 +17,7 @@ env: DATABASE_URI: postgresql://user:password@postgres:5432/db GOOGLE_MAPS_API_KEY: AIzaDummyKeyForTests # Fake key to mock the Google API 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`