Upgrade CI to latest version, and simplify tox.ini

This commit is contained in:
Emil Stenström 2023-03-25 09:29:22 +01:00
parent d658fecf5c
commit 196c748a9f
2 changed files with 21 additions and 21 deletions

View file

@ -1,28 +1,26 @@
name: Run tests name: Run tests
on: [push, pull_request, workflow_dispatch] on:
- push
- pull_request
- workflow_dispatch
jobs: jobs:
run-tests: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: python-version: ['3.7', '3.8', '3.9', '3.10']
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install tox tox-gh-actions python -m pip install tox tox-gh-actions
- name: Run tests - name: Run tests
run: | run: tox -vv
tox

16
tox.ini
View file

@ -3,18 +3,20 @@
[tox] [tox]
envlist = envlist =
py{36,37}-django{32} py36-django{32}
py{38,39}-django{32,40} py37-django{32}
py38-django{32,40}
py39-django{32,40}
py310-django{40} py310-django{40}
flake8 flake8
isort isort
[gh-actions] [gh-actions]
3.6 = py36-django{32} 3.6 = py36
3.7 = py37-django{32} 3.7 = py37
3.8 = py38-django{32,40} 3.8 = py38
3.9 = py39-django{32,40} 3.9 = py39
3.10 = py310-django{40}, flake8, isort 3.10 = py310, flake8, isort
[testenv] [testenv]
deps = deps =