| 1 |
name: Tests |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read |
| 7 |
|
| 8 |
jobs: |
| 9 |
build: |
| 10 |
runs-on: ${{ matrix.os }} |
| 11 |
timeout-minutes: 10 |
| 12 |
strategy: |
| 13 |
fail-fast: false |
| 14 |
matrix: |
| 15 |
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev", "pypy-3.11"] |
| 16 |
os: [ubuntu-22.04, macOS-latest, windows-latest] |
| 17 |
# Pypy-3.11 can't install openssl-sys with rust |
| 18 |
# which prevents us from testing in GHA. |
| 19 |
exclude: |
| 20 |
- { python-version: "pypy-3.11", os: "windows-latest" } |
| 21 |
|
| 22 |
steps: |
| 23 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 24 |
with: |
| 25 |
persist-credentials: false |
| 26 |
- name: Set up Python ${{ matrix.python-version }} |
| 27 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 28 |
with: |
| 29 |
python-version: ${{ matrix.python-version }} |
| 30 |
cache: 'pip' |
| 31 |
allow-prereleases: true |
| 32 |
- name: Install dependencies |
| 33 |
env: |
| 34 |
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: ${{ matrix.python-version == '3.15-dev' && '1' || '' }} |
| 35 |
run: | |
| 36 |
make |
| 37 |
- name: Run tests |
| 38 |
run: | |
| 39 |
make ci |
| 40 |
|
| 41 |
no_chardet: |
| 42 |
name: "No Character Detection" |
| 43 |
runs-on: ubuntu-latest |
| 44 |
strategy: |
| 45 |
fail-fast: true |
| 46 |
|
| 47 |
steps: |
| 48 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 49 |
with: |
| 50 |
persist-credentials: false |
| 51 |
- name: 'Set up Python 3.10' |
| 52 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 |
| 53 |
with: |
| 54 |
python-version: '3.10' |
| 55 |
- name: Install dependencies |
| 56 |
run: | |
| 57 |
make |
| 58 |
python -m pip uninstall -y "charset_normalizer" "chardet" |
| 59 |
- name: Run tests |
| 60 |
run: | |
| 61 |
make ci |
| 62 |
|
| 63 |
urllib3: |
| 64 |
name: 'urllib3 1.x' |
| 65 |
runs-on: 'ubuntu-latest' |
| 66 |
strategy: |
| 67 |
fail-fast: true |
| 68 |
|
| 69 |
steps: |
| 70 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| 71 |
with: |
| 72 |
persist-credentials: false |
| 73 |
- name: 'Set up Python 3.10' |
| 74 |
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 |
| 75 |
with: |
| 76 |
python-version: '3.10' |
| 77 |
- name: Install dependencies |
| 78 |
run: | |
| 79 |
make |
| 80 |
python -m pip install "urllib3<2" |
| 81 |
- name: Run tests |
| 82 |
run: | |
| 83 |
make ci |