3
on: [push, pull_request, workflow_dispatch]
13
runs-on: ubuntu-latest
17
- name: "Checkout repository"
18
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
20
- name: "Setup Python"
21
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
26
- name: "Check packages"
28
python -m pip install -U pip setuptools wheel build twine rstcheck
31
python -m twine check dist/*
37
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
48
- python-version: "3.8"
51
nox-session: test_integration
52
- python-version: "3.9"
55
nox-session: test_integration
56
- python-version: "3.12"
59
nox-session: test_integration
61
- python-version: "3.8"
66
- python-version: "pypy-3.8"
69
nox-session: test-pypy3.8
70
- python-version: "pypy-3.9"
73
nox-session: test-pypy3.9
74
- python-version: "pypy-3.10"
77
nox-session: test-pypy3.10
78
- python-version: "3.x"
82
nox-session: test_brotlipy
84
- python-version: "3.9.2"
88
- python-version: "3.11"
90
nox-session: emscripten
92
- python-version: "3.13"
97
- python-version: "3.8"
100
runs-on: ${{ matrix.os }}
101
name: ${{ fromJson('{"macos-12":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu","ubuntu-20.04":"Ubuntu 20.04 (OpenSSL 1.1.1)","ubuntu-22.04":"Ubuntu 22.04 (OpenSSL 3.0)"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}}
102
continue-on-error: ${{ matrix.experimental }}
105
- name: "Checkout repository"
106
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
110
- name: "Setup Python ${{ matrix.python-version }}"
111
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
113
python-version: ${{ matrix.python-version }}
114
allow-prereleases: true
116
- name: "Install dependencies"
117
run: python -m pip install --upgrade pip setuptools nox
119
- name: "Install Chrome"
120
uses: browser-actions/setup-chrome@db1b524c26f20a8d1a10f7fc385c92387e2d0477
121
if: ${{ matrix.nox-session == 'emscripten' }}
122
- name: "Install Firefox"
123
uses: browser-actions/setup-firefox@233224b712fc07910ded8c15fb95a555c86da76f
124
if: ${{ matrix.nox-session == 'emscripten' }}
127
run: nox -s ${NOX_SESSION:-test-$PYTHON_VERSION}
129
PYTHON_VERSION: ${{ matrix.python-version }}
130
NOX_SESSION: ${{ matrix.nox-session }}
132
- name: "Upload coverage data"
133
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
135
name: coverage-data-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.experimental }}-${{ matrix.nox-session }}
137
if-no-files-found: error
142
runs-on: "ubuntu-latest"
145
- name: "Checkout repository"
146
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
148
- name: "Setup Python"
149
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
151
python-version: "3.x"
153
- name: "Install coverage"
154
run: "python -m pip install -r dev-requirements.txt"
156
- name: "Download coverage data"
157
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
159
pattern: coverage-data-*
162
- name: "Combine & check coverage"
165
python -m coverage combine
166
python -m coverage html --skip-covered --skip-empty
167
python -m coverage report --ignore-errors --show-missing --fail-under=100
169
- if: ${{ failure() }}
170
name: "Upload report if check failed"
171
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
173
name: coverage-report