From 27d761731cc0c915632c7bc79eba8ced28b28f74 Mon Sep 17 00:00:00 2001 From: Xarvex Date: Sun, 19 Jul 2026 15:51:58 -0500 Subject: [PATCH] fix(ci): setup Ruff once, invoke manually The parallel steps can have a race condition if they both have a lock on the final Ruff installation path. Initially, the action was reused for formatting and linting as the ruff-action sets the necessary environment variables and matchers, responsible for the annotations on the GitHub UI. Though, as it turns out, this is already done whenever Ruff is installed, there is no "special magic" whenever execution of the process happens. So, only use the action for setup once, and in the parallel steps we can invoke Ruff ourselves. --- .github/workflows/checks_python.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks_python.yml b/.github/workflows/checks_python.yml index 23f71eb6..129ae8a6 100644 --- a/.github/workflows/checks_python.yml +++ b/.github/workflows/checks_python.yml @@ -210,11 +210,18 @@ jobs: steps: - *checkout + - name: Setup Ruff + uses: astral-sh/ruff-action@v4.0.0 + with: + # No-op operation, since executing Ruff cannot be disabled for the action. + # Note that `--version` has different behavior than `version`, as the + # latter will fail if passed any extra args, even if that arg is empty. + args: --version + src: '' + - parallel: - name: Run Ruff linter - uses: astral-sh/ruff-action@v4.0.0 + run: ruff check - name: Run Ruff formatter - uses: astral-sh/ruff-action@v4.0.0 - with: - args: format --check + run: ruff format --check