From 9bd72cc0a632cb56b880356d9e1ffcaa77a228fd Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:56:43 +0100 Subject: [PATCH] FIX: add `--no-dev` flag if using `--group` flag (#115) --- .github/workflows/docnb.yml | 1 + .github/workflows/linkcheck.yml | 1 + .github/workflows/pre-commit.yml | 2 +- .github/workflows/pytest.yml | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docnb.yml b/.github/workflows/docnb.yml index 79ed828..1c37ad7 100644 --- a/.github/workflows/docnb.yml +++ b/.github/workflows/docnb.yml @@ -56,6 +56,7 @@ jobs: run: >- uv run \ --group doc \ + --no-dev \ --with tox \ tox -e doc - if: hashFiles('docs/_build/html') diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index bac7f20..22ccbcf 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -36,5 +36,6 @@ jobs: run: >- uv run \ --group doc \ + --no-dev \ --with tox \ tox -e linkcheck diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index f750a28..3bff1e1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -53,7 +53,7 @@ jobs: enable-cache: true - name: Determine if repository is Python package run: | - uv_command=$(uv pip install -e '.[sty]' > /dev/null && uv sync --group style && echo "uv run --group style" || echo uvx) + uv_command=$(uv pip install -e '.[sty]' > /dev/null && uv sync --group style --no-dev && echo "uv run --group style --no-dev" || echo uvx) echo "UV_COMMAND=$uv_command" | tee -a "$GITHUB_ENV" - name: Fetch pre-commit cache uses: actions/cache@v4 diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9b2103e..822f3b4 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -101,6 +101,7 @@ jobs: uv run \ --group test \ ${{ steps.extra.outputs.extras }} \ + --no-dev \ ${{ steps.with.outputs.packages }} \ pytest \ ${{ steps.coverage.outputs.flags }} \