build(deps): bump path-to-regexp from 0.1.12 to 0.1.13 in /tests/servers/apollo-server/v2 #478
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: Test Suite | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'docs/**' | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| tests: | |
| name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.transport }} | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [Ubuntu] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| transport: ["aiohttp", "httpx", "all"] | |
| services: | |
| postgres: | |
| image: docker.io/postgres:9.6-alpine | |
| env: | |
| POSTGRES_PASSWORD: hasura | |
| POSTGRES_USER: hasura | |
| POSTGRES_DB: hasura | |
| ports: | |
| - 5432:5432 | |
| hasura: | |
| image: quay.io/twyla-ai/hasura-world-db:latest | |
| env: | |
| HASURA_GRAPHQL_DATABASE_URL: postgres://hasura:hasura@postgres:5432/hasura | |
| HASURA_GRAPHQL_ADMIN_SECRET: secret | |
| ports: | |
| - 8080:8080 | |
| options: --restart on-failure | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Start podman socket | |
| shell: bash | |
| run: | | |
| systemctl --user start podman.socket | |
| systemctl --user status podman.socket | |
| - name: Start test containers | |
| shell: bash | |
| run: | | |
| export DOCKER_HOST="unix:///run/user/$(id -u)/podman/podman.sock" | |
| podman compose up -d apollo-server-v2 strawberry-server | |
| - name: Wait for strawberry | |
| shell: bash | |
| run: | | |
| timeout 60s bash -c \ | |
| 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" 127.0.0.1:5000/graphql)" != "200" ]]; do sleep 2; done' \ | |
| || false | |
| - name: Install poetry and tox | |
| run: pipx install poetry tox | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Get poetry cache directory | |
| run: printf 'cache-dir=%s\n' "$(poetry config cache-dir)" >> $GITHUB_OUTPUT | |
| id: poetry-config | |
| shell: bash | |
| - name: Get current date | |
| run: printf 'date=%s\n' "$(date -I)" >> $GITHUB_OUTPUT | |
| id: get-date | |
| shell: bash | |
| - name: Cache Poetry | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.poetry-config.outputs.cache-dir }}/artifacts | |
| ${{ steps.poetry-config.outputs.cache-dir }}/cache | |
| key: poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.transport }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }} | |
| restore-keys: | | |
| poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.transport }}- | |
| poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}-${{ matrix.python-version }}- | |
| poetry-${{ steps.get-date.outputs.date }}-${{ runner.os }}- | |
| enableCrossOsArchive: true | |
| - name: Wait for hasura | |
| shell: bash | |
| run: | | |
| timeout 300s bash -c \ | |
| 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:${{ job.services.hasura.ports[8080] }}/healthz)" != "200" ]]; do sleep 5; done' \ | |
| || false | |
| - name: Execute test suite | |
| shell: bash | |
| env: | |
| SERVER_WORLD_DB: "http://127.0.0.1:${{ job.services.hasura.ports[8080] }}/v1/graphql" | |
| SERVER_APOLLO_V2: "http://127.0.0.1:4000/graphql" | |
| SERVER_STRAWBERRY: "http://127.0.0.1:5000/graphql" | |
| run: | | |
| TOX_ENV="py$(echo ${{ matrix.python-version }} | tr -d '.')-${{ matrix.transport }}" | |
| tox -e $TOX_ENV |