mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-07-21 13:06:26 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user