Merge pull request #1190 from python-openapi/feature/migrate-to-httpx2 #391
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: CI / Contrib / Tests | |
| on: | |
| push: | |
| paths: | |
| - openapi_core/** | |
| - tests/integration/contrib/** | |
| - tests/unit/contrib/** | |
| - tests/integration/conftest.py | |
| - tests/integration/data/** | |
| - pyproject.toml | |
| - poetry.lock | |
| - .github/workflows/contrib-tests.yml | |
| pull_request: | |
| types: [opened, synchronize] | |
| paths: | |
| - openapi_core/** | |
| - tests/integration/contrib/** | |
| - tests/unit/contrib/** | |
| - tests/integration/conftest.py | |
| - tests/integration/data/** | |
| - pyproject.toml | |
| - poetry.lock | |
| - .github/workflows/contrib-tests.yml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| contrib_matrix: | |
| name: "py${{ matrix.python-version }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Get full Python version | |
| id: full-python-version | |
| run: python -c "import sys; print(f\"version={'-'.join(str(v) for v in sys.version_info)}\")" >> "$GITHUB_OUTPUT" | |
| - name: Set up poetry | |
| uses: Gr1N/setup-poetry@v9 | |
| with: | |
| poetry-version: "2.3.1" | |
| - name: Set up cache | |
| uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: | | |
| ~/.cache/pypoetry | |
| ~/.cache/pip | |
| key: deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-contrib-${{ hashFiles('**/poetry.lock', 'pyproject.toml') }} | |
| restore-keys: | | |
| deps-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-contrib- | |
| deps-${{ runner.os }}-${{ matrix.python-version }}- | |
| - name: Install tox | |
| run: python -m pip install tox | |
| - name: Test | |
| env: | |
| TOX_SKIP_ENV: ${{ contains(fromJSON('["3.10", "3.11"]'), matrix.python-version) && '^contrib-django-6x$' || '' }} | |
| run: tox -m contrib -p auto | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: reports/coverage-*.xml | |
| flags: contrib,py${{ matrix.python-version }} | |
| name: contrib-py${{ matrix.python-version }} |