Update Django and Python versions in test matrix #67
Workflow file for this run
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" # Note that this name appears in the README's badge | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| release: | |
| types: [published] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| django-tox-env: | |
| - "django32" | |
| - "django42" | |
| - "django51" | |
| - "django52" | |
| exclude: # We don't want every combination of the above, as some are not compatible | |
| - python-version: "3.11" | |
| django-tox-env: "django32" | |
| - python-version: "3.9" | |
| django-tox-env: "django51" | |
| - python-version: "3.9" | |
| django-tox-env: "django52" | |
| name: Python ${{ matrix.python-version }} + ${{ matrix.django-tox-env }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install tox | |
| run: pip install tox | |
| - name: Run tox | |
| run: tox -e py${{ matrix.python-version }}-${{ matrix.django-tox-env }} --skip-missing-interpreter=false | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Flake8 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Install tox | |
| run: pip install tox | |
| - name: Run tox | |
| run: tox -e py3.9-flake8 | |
| release: | |
| name: django-mozilla-product-details Release | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| needs: | |
| - test | |
| - lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.9" | |
| - name: Install packaging dependencies | |
| run: pip install Django requests build | |
| - name: Ensure the latest product-details json files are pulled in | |
| run: python updatejson.py | |
| - name: Build package for upload to PyPI | |
| run: python -m build . | |
| - name: Upload the distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.4.2 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |