[fix] Fixed broken settings and issues with drf-yasg #37
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 | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| django-version: | |
| [ | |
| "django~=4.2.0", | |
| "django~=5.0.0", | |
| "django~=5.1.0", | |
| "django~=5.2.0", | |
| "django~=6.0.0", | |
| ] | |
| exclude: | |
| # Django 6.0 requires Python 3.12+ | |
| - python-version: "3.10" | |
| django-version: "django~=6.0.0" | |
| - python-version: "3.11" | |
| django-version: "django~=6.0.0" | |
| 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: Cache pip packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ hashFiles('**/setup.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.django-version }}- | |
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | |
| ${{ runner.os }}-pip- | |
| - name: Install Python dependencies | |
| id: deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ${{ matrix.django-version }} | |
| pip install coverage | |
| pip install -e . | |
| - name: Run tests | |
| if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} | |
| run: | | |
| coverage run runtests.py | |
| coverage combine | |
| coverage xml | |
| coverage report | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./coverage.xml | |
| flag-name: python-${{ matrix.python-version }}-django-${{ matrix.django-version }} | |
| parallel: true | |
| qa: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[test] | |
| - name: Run QA checks | |
| run: ./run-qa-checks | |
| finish: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true |