Merge pull request #250 from michael-k/gh-actions-python3.10-django4.0

Switch from Travis CI to GitHub Actions and run tests against Python 3.10 and Django 4.0
master
Brandon Taylor 2021-12-16 20:58:56 -05:00 committed by GitHub
commit b0c25c303c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 26 deletions

52
.github/workflows/tests.yml vendored 100644
View File

@ -0,0 +1,52 @@
---
name: Tests
on:
push:
branches:
- develop
- master
pull_request:
jobs:
tests:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
django-version:
- "2.2.17" # first version to support Python 3.9
- "3.1.3" # first version to support Python 3.9
- "3.2.0"
include:
- python-version: "3.8"
django-version: "4.0.0"
- python-version: "3.9"
django-version: "4.0.0"
- python-version: "3.10"
django-version: "3.2.9" # first version to support Python 3.10
- python-version: "3.10"
django-version: "4.0.0"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade "django~=${{ matrix.django-version}}"
- name: Run tests
run: python manage.py test
working-directory: sample_project

View File

@ -1,24 +0,0 @@
arch:
- amd64
- ppc64le
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
env:
- DJANGO_VERSION=2.2 SAMPLE_PROJECT=sample_project
- DJANGO_VERSION=3.1 SAMPLE_PROJECT=sample_project
- DJANGO_VERSION=3.2 SAMPLE_PROJECT=sample_project
branches:
only:
- develop
install:
- pip install django==$DJANGO_VERSION
script:
- cd $SAMPLE_PROJECT
- python manage.py test

View File

@ -22,7 +22,7 @@ Sorting inlines:
![sortable-inlines](http://res.cloudinary.com/alsoicode/image/upload/v1451237555/django-admin-sortable/sortable-inlines.jpg) ![sortable-inlines](http://res.cloudinary.com/alsoicode/image/upload/v1451237555/django-admin-sortable/sortable-inlines.jpg)
## Supported Django Versions ## Supported Django Versions
For Django 3 use the latest version For Django 3 and 4 use the latest version
For Django 1.8.x < 3.0, use 2.1.8. For Django 1.8.x < 3.0, use 2.1.8.

View File

@ -27,7 +27,7 @@ Sorting inlines:
Supported Django Versions Supported Django Versions
------------------------- -------------------------
For Django 3 use the latest version For Django 3 and 4 use the latest version
For Django 1.8.x < 3.0, use 2.1.8. For Django 1.8.x < 3.0, use 2.1.8.