Merge pull request #7 from airblackbox/design/brand-kit #28
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: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate docker-compose | |
| run: docker compose config --quiet | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Lint test files | |
| run: python -m py_compile tests/*.py | |
| integration: | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Start the stack | |
| run: docker compose up -d --quiet-pull | |
| - name: Wait for gateway health | |
| run: | | |
| for i in $(seq 1 30); do | |
| curl -sf http://localhost:8080/health && exit 0 | |
| sleep 2 | |
| done | |
| echo "Gateway never became healthy" >&2 | |
| docker compose logs | |
| exit 1 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install test dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run integration tests | |
| env: | |
| AIR_REQUIRE_STACK: "1" | |
| run: python -m pytest tests/ -v | |
| - name: Stack logs on failure | |
| if: failure() | |
| run: docker compose logs | |
| - name: Tear down | |
| if: always() | |
| run: docker compose down -v |