| 1 |
name: Review |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
jobs: |
| 6 |
test: |
| 7 |
name: Run linters and tests |
| 8 |
runs-on: ubuntu-latest |
| 9 |
strategy: |
| 10 |
fail-fast: false |
| 11 |
matrix: |
| 12 |
python: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
| 13 |
|
| 14 |
steps: |
| 15 |
- name: Checkout the source code |
| 16 |
uses: actions/checkout@v6 |
| 17 |
|
| 18 |
- name: Set the python version |
| 19 |
uses: actions/setup-python@v6 |
| 20 |
with: |
| 21 |
python-version: ${{ matrix.python }} |
| 22 |
|
| 23 |
- name: Install dependencies |
| 24 |
uses: ./.github/actions/install |
| 25 |
with: |
| 26 |
python-version: ${{ matrix.python }} |
| 27 |
|
| 28 |
- name: Run tests |
| 29 |
run: tox -e $(tox -l | grep py${PYTHON_VERSION//.} | paste -sd "," -) |
| 30 |
env: |
| 31 |
PYTHON_VERSION: ${{ matrix.python }} |
| 32 |
|
| 33 |
- name: Report coverage |
| 34 |
run: | |
| 35 |
pip install coverage |
| 36 |
coverage report |
| 37 |
|
| 38 |
- name: Check for incompatibilities with publishing to PyPi |
| 39 |
if: ${{ matrix.python == 3.13 }} |
| 40 |
run: | |
| 41 |
pip install -r requirements/publish.txt |
| 42 |
python -m build --sdist |
| 43 |
twine check dist/* |
| 44 |
|
| 45 |
# Return successful statuses "Run linters and tests" for python {3.6...8} |
| 46 |
# These are required for branch protection rules that cannot be removed yet |
| 47 |
# https://github.com/axnsan12/drf-yasg/pull/922#issuecomment-2739945046 |
| 48 |
review: |
| 49 |
name: Run linters and tests |
| 50 |
runs-on: ubuntu-latest |
| 51 |
needs: test |
| 52 |
strategy: |
| 53 |
fail-fast: false |
| 54 |
matrix: |
| 55 |
python: ["3.6", "3.7", "3.8", "3.9"] |
| 56 |
|
| 57 |
steps: |
| 58 |
- run: echo "Deprecated tests skipped 🧪" |