Skip to content

Update tox matrix versions #54

Update tox matrix versions

Update tox matrix versions #54

Workflow file for this run

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"
- "django40"
- "django42"
- "django50"
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.11"
django-tox-env: "django40"
- python-version: "3.9"
django-tox-env: "django50"
name: Python ${{ matrix.python-version }} + ${{ matrix.django-tox-env }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
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: Flake 8
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install test requirements
run: pip install tox flake8
- 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@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install lightest dependencies for successful packaging
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/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}