Implement DynamicThrottle with sync/async #3155
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: test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| docker-compose-services: ['redis'] | |
| python-version: ['3.11', '3.12', '3.13', '3.14'] | |
| include: | |
| - python-version: '3.14t' | |
| force_free_gil: true | |
| docker-compose-services: 'redis' | |
| - python-version: '3.13' | |
| docker-compose-services: 'valkey' | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| - name: Install just | |
| run: uv tool install rust-just | |
| - name: Pull and build docker compose services | |
| if: ${{ matrix.docker-compose-services }} | |
| run: | | |
| docker compose pull ${{ matrix.docker-compose-services }} | |
| docker compose up --detach ${{ matrix.docker-compose-services }} | |
| - name: Install dependencies | |
| run: | | |
| # System deps: | |
| sudo apt update && sudo apt install -y gettext wait-for-it | |
| # Python deps: | |
| just install | |
| # We don't install `orjson` in `pyproject.toml`, | |
| # because we run `3.14t` as well and it cannot be installed there :( | |
| # No way to exclude the platform on a file level. | |
| uv pip install orjson || true | |
| - name: Wait for database to come online | |
| if: ${{ matrix.docker-compose-services }} | |
| run: wait-for-it --host='localhost' --port=6379 --timeout=30 --strict | |
| - name: Run checks | |
| run: just test | |
| env: | |
| PYTHON_GIL: ${{ matrix.force_free_gil && '0' || '1' }} | |
| # Upload coverage to codecov: https://codecov.io/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 | |
| with: | |
| files: ./coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Tracecov report | |
| run: cat tracecov-report.md >> "$GITHUB_STEP_SUMMARY" | |
| - name: Stop docker compose services | |
| if: ${{ always() && matrix.docker-compose-services }} | |
| run: docker compose down || true |