Patch Changelog #17
Workflow file for this run
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: Live Smoke | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| baseline: | |
| description: >- | |
| guard-core version spec to test instead of this checkout's wheel | |
| (e.g. guard-core==3.17.0). Leave empty to build and test the wheel | |
| from this checkout. | |
| required: false | |
| default: '' | |
| jobs: | |
| live-smoke: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra dev --extra otel --extra logfire | |
| - name: Build the guard-core wheel from this checkout | |
| if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.baseline == '' }} | |
| run: | | |
| uv build --wheel --out-dir tests/live_smoke/stack/wheels | |
| - name: Fetch fastapi-guard's example app | |
| run: | | |
| uv run python tests/live_smoke/fetch_example_app.py | |
| - name: Patch the example app for scenario-driven config overrides | |
| run: | | |
| uv run python tests/live_smoke/patch_example_config.py | |
| - name: Bring the live-smoke stack up | |
| run: | | |
| cd tests/live_smoke/stack | |
| docker compose -p guard-core-live-smoke up --build --wait | |
| - name: Run the live-smoke driver | |
| shell: bash | |
| env: | |
| LIVE_SMOKE: '1' | |
| LIVE_SMOKE_BASELINE: ${{ github.event.inputs.baseline }} | |
| run: | | |
| mkdir -p tests/live_smoke/live-smoke-report | |
| uv run pytest tests/live_smoke -m live_smoke -v \ | |
| --junitxml=tests/live_smoke/live-smoke-report/junit.xml \ | |
| 2>&1 | tee tests/live_smoke/live-smoke-report/driver.log | |
| - name: Bring the live-smoke stack down | |
| if: always() | |
| run: | | |
| cd tests/live_smoke/stack | |
| docker compose -p guard-core-live-smoke down -v --remove-orphans | |
| - name: Upload live-smoke report and container logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: live-smoke-report | |
| path: tests/live_smoke/live-smoke-report/ | |
| if-no-files-found: warn |