Release 1.0.0: public API SemVer-stable; core + Celery/Django adapters #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install (with Celery + Django adapters) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,celery,django]" | |
| - name: Run tests | |
| run: pytest | |
| lint: | |
| name: Static analysis (ruff + mypy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install (dev + all adapters for type context) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,celery,django,redis,amqp]" | |
| - name: Ruff | |
| run: ruff check src tests | |
| - name: Mypy | |
| run: mypy | |
| integration: | |
| name: Redis integration | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| rabbitmq: | |
| image: rabbitmq:3 | |
| ports: | |
| - 5672:5672 | |
| options: >- | |
| --health-cmd "rabbitmq-diagnostics -q ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install (all adapters — full coverage with brokers) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[redis,amqp,celery,django,dev]" | |
| - name: Run full suite with coverage gate (>=90%) | |
| env: | |
| BABELQUEUE_TEST_REDIS: redis://localhost:6379/0 | |
| BABELQUEUE_TEST_AMQP: amqp://guest:guest@localhost:5672/ | |
| run: pytest --cov=babelqueue --cov-report=term-missing --cov-fail-under=90 | |
| conformance: | |
| name: Conformance suite in sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Verify vendored conformance matches the canonical suite | |
| run: | | |
| git clone --depth 1 https://github.com/BabelQueue/conformance.git "$RUNNER_TEMP/conformance" | |
| diff -ru "$RUNNER_TEMP/conformance/manifest.json" "tests/conformance/manifest.json" | |
| diff -ru "$RUNNER_TEMP/conformance/fixtures" "tests/conformance/fixtures" | |
| diff -ru "$RUNNER_TEMP/conformance/schema" "tests/conformance/schema" | |
| echo "Vendored conformance is in sync with the canonical suite." | |
| ci-green: | |
| name: CI green | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, integration, conformance] | |
| if: ${{ always() }} | |
| steps: | |
| - name: Fail if any required job did not pass | |
| run: | | |
| if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then | |
| echo "A required job failed or was cancelled." | |
| exit 1 | |
| fi |