From e76aa36a29e55767c756ae637a930df70b24d62e Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 29 May 2026 12:22:33 -0400 Subject: [PATCH] ci(I1): dedicated fast-fail ruff lint lane MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ruff is pre-installed in the ci-python image, so a new `lint` job runs it with no dependency install and fails in seconds — surfacing the common lint bounce class without waiting on the backend job's ~30-60s wheel install. Dropped the now-redundant ruff step from backend-lint-and-test (same job name, required-checks unchanged). Co-Authored-By: Claude Opus 4.7 (1M context) --- .forgejo/workflows/ci.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 45b3571..cb247cf 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -1,7 +1,8 @@ name: CI # CI lanes per FabledRulebook/forgejo.md "CI philosophy": -# - backend-lint-and-test: ruff + `pytest -m "not integration"`, no service containers. +# - lint: ruff only, no dep install — fast-fail for the common lint bounce. +# - backend-lint-and-test: `pytest -m "not integration"`, no service containers. # - frontend-build: vitest unit + vite build. # - integration: pgvector + redis service containers; alembic + `pytest -m integration`. @@ -14,6 +15,20 @@ on: # (single-operator Forgejo repo) so push coverage is complete. jobs: + # Fast-fail lint lane. ruff is pre-installed in the ci-python image, so + # this runs with NO dependency install and surfaces the most common bounce + # class (lint: I001 / UP037 / ASYNC109 / W293 …) in seconds — instead of + # after the backend job's ~30-60s wheel install. ruff is static analysis, + # so no DB/secret env is needed. + lint: + runs-on: python-ci + container: + image: git.fabledsword.com/bvandeusen/ci-python:3.14 + steps: + - uses: actions/checkout@v4 + - name: Ruff lint + run: ruff check backend/ tests/ alembic/ + backend-lint-and-test: runs-on: python-ci container: @@ -51,9 +66,8 @@ jobs: pip install -r requirements.txt pytest pytest-asyncio fi - - name: Ruff lint - run: ruff check backend/ tests/ alembic/ - + # Ruff moved to the dedicated fast `lint` job above (fails in seconds, + # no dep install). This job is now unit tests only. - name: Pytest (unit only — integration runs in the integration job) run: pytest tests/ -v -m "not integration"