3232 - name : Run tests
3333 run : pytest
3434
35+ lint :
36+ name : Static analysis (ruff + mypy)
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v5
40+ - name : Setup Python
41+ uses : actions/setup-python@v5
42+ with :
43+ python-version : ' 3.12'
44+ - name : Install (dev + all adapters for type context)
45+ run : |
46+ python -m pip install --upgrade pip
47+ pip install -e ".[dev,celery,django,redis,amqp]"
48+ - name : Ruff
49+ run : ruff check src tests
50+ - name : Mypy
51+ run : mypy
52+
3553 integration :
3654 name : Redis integration
3755 runs-on : ubuntu-latest
@@ -62,16 +80,16 @@ jobs:
6280 with :
6381 python-version : ' 3.12'
6482
65- - name : Install (with redis + amqp extras )
83+ - name : Install (all adapters — full coverage with brokers )
6684 run : |
6785 python -m pip install --upgrade pip
68- pip install -e ".[redis,amqp,dev]"
86+ pip install -e ".[redis,amqp,celery,django, dev]"
6987
70- - name : Run tests (Redis + RabbitMQ transports included )
88+ - name : Run full suite with coverage gate (>=90% )
7189 env :
7290 BABELQUEUE_TEST_REDIS : redis://localhost:6379/0
7391 BABELQUEUE_TEST_AMQP : amqp://guest:guest@localhost:5672/
74- run : pytest
92+ run : pytest --cov=babelqueue --cov-report=term-missing --cov-fail-under=90
7593
7694 conformance :
7795 name : Conformance suite in sync
@@ -85,3 +103,16 @@ jobs:
85103 diff -ru "$RUNNER_TEMP/conformance/fixtures" "tests/conformance/fixtures"
86104 diff -ru "$RUNNER_TEMP/conformance/schema" "tests/conformance/schema"
87105 echo "Vendored conformance is in sync with the canonical suite."
106+
107+ ci-green :
108+ name : CI green
109+ runs-on : ubuntu-latest
110+ needs : [test, lint, integration, conformance]
111+ if : ${{ always() }}
112+ steps :
113+ - name : Fail if any required job did not pass
114+ run : |
115+ if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then
116+ echo "A required job failed or was cancelled."
117+ exit 1
118+ fi
0 commit comments