Skip to content

Commit c18128c

Browse files
amosttAygentic
andcommitted
fix(ci): run lint commands directly with uv run instead of bash script
The issue was that 'uv run bash scripts/lint.sh' doesn't activate the venv for the bash subprocess, so commands inside the script can't find tools. Solution: Run lint commands directly in workflow with 'uv run' prefix: - uv run mypy app - uv run ruff check app - uv run ruff format app --check This is the recommended approach per uv documentation and GitHub issue fastapi#1910. The bash script approach doesn't work because bash subprocess doesn't inherit the activated environment. Related to CUR-29 🤖 Generated by Aygentic Co-Authored-By: Aygentic <noreply@aygentic.com>
1 parent f781312 commit c18128c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/lint-backend.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
- name: Install dependencies
2828
run: uv sync
2929
working-directory: backend
30-
- name: Run linters
31-
run: uv run bash scripts/lint.sh
30+
- name: Run mypy
31+
run: uv run mypy app
3232
working-directory: backend
3333
env:
3434
# Required env vars for Settings class initialization during mypy analysis
@@ -44,3 +44,9 @@ jobs:
4444
REDIS_URL: redis://:dummy@localhost:6379/0
4545
CELERY_BROKER_URL: redis://:dummy@localhost:6379/0
4646
CELERY_RESULT_BACKEND: redis://:dummy@localhost:6379/0
47+
- name: Run ruff check
48+
run: uv run ruff check app
49+
working-directory: backend
50+
- name: Run ruff format check
51+
run: uv run ruff format app --check
52+
working-directory: backend

0 commit comments

Comments
 (0)