|
| 1 | +name: Integration requests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + types: [opened, synchronize] |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read |
| 10 | + id-token: write |
| 11 | + |
| 12 | +jobs: |
| 13 | + integration-requests: |
| 14 | + name: "Integration requests" |
| 15 | + runs-on: ubuntu-latest |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] |
| 19 | + fail-fast: false |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v6 |
| 22 | + |
| 23 | + - name: Set up Python ${{ matrix.python-version }} |
| 24 | + uses: actions/setup-python@v6 |
| 25 | + with: |
| 26 | + python-version: ${{ matrix.python-version }} |
| 27 | + |
| 28 | + - name: Get full Python version |
| 29 | + id: full-python-version |
| 30 | + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") |
| 31 | + |
| 32 | + - name: Set up poetry |
| 33 | + uses: Gr1N/setup-poetry@v9 |
| 34 | + with: |
| 35 | + poetry-version: "2.3.1" |
| 36 | + |
| 37 | + - name: Configure poetry |
| 38 | + run: poetry config virtualenvs.in-project true |
| 39 | + |
| 40 | + - name: Set up cache |
| 41 | + uses: actions/cache@v5 |
| 42 | + id: cache |
| 43 | + with: |
| 44 | + path: .venv |
| 45 | + key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} |
| 46 | + |
| 47 | + - name: Ensure cache is healthy |
| 48 | + if: steps.cache.outputs.cache-hit == 'true' |
| 49 | + run: timeout 10s poetry run pip --version || rm -rf .venv |
| 50 | + |
| 51 | + - name: Install dependencies |
| 52 | + run: poetry install --all-extras |
| 53 | + |
| 54 | + - name: Test |
| 55 | + env: |
| 56 | + PYTEST_ADDOPTS: "--color=yes" |
| 57 | + run: poetry run pytest tests/integration/contrib/requests |
| 58 | + |
| 59 | + - name: Upload coverage |
| 60 | + uses: codecov/codecov-action@v5 |
0 commit comments