Feature/async - potential v2 release candidate #2
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: Integration Tests | |
| on: | |
| pull_request: | |
| branches: [main, 2.0-development] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: integration-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| comlink: | |
| image: ghcr.io/swgoh-utils/swgoh-comlink:latest | |
| env: | |
| APP_NAME: comlink-python-integration-tests | |
| ports: | |
| - 3000:3000 | |
| comlink-hmac: | |
| image: ghcr.io/swgoh-utils/swgoh-comlink:latest | |
| env: | |
| APP_NAME: comlink-python-integration-tests | |
| ACCESS_KEY: test_public_key | |
| SECRET_KEY: test_secret_key | |
| ports: | |
| - 3001:3000 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv pip install --system -e "." pytest pytest-asyncio | |
| - name: Wait for Comlink services | |
| run: | | |
| comlink_ready=false | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3000/metadata > /dev/null 2>&1; then | |
| comlink_ready=true | |
| echo "Comlink is ready!" | |
| break | |
| fi | |
| echo "Waiting for Comlink... ($i/30)" | |
| sleep 2 | |
| done | |
| if [ "$comlink_ready" != "true" ]; then | |
| echo "::error::Comlink service failed to start within 60 seconds" | |
| docker ps -a | |
| exit 1 | |
| fi | |
| hmac_ready=false | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3001/metadata > /dev/null 2>&1; then | |
| hmac_ready=true | |
| echo "Comlink HMAC is ready!" | |
| break | |
| fi | |
| echo "Waiting for Comlink HMAC... ($i/30)" | |
| sleep 2 | |
| done | |
| if [ "$hmac_ready" != "true" ]; then | |
| echo "::error::Comlink HMAC service failed to start within 60 seconds" | |
| docker ps -a | |
| exit 1 | |
| fi | |
| - name: Run integration tests | |
| env: | |
| RUN_INTEGRATION_TESTS: "1" | |
| run: python -m pytest tests/integration/ -v |