Skip to content

Drop python 2 support #291

Drop python 2 support

Drop python 2 support #291

Workflow file for this run

---
name: CI
"on":
pull_request:
push:
branches:
- master
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-18.04
container: python:${{ matrix.env.python }}-buster
strategy:
matrix:
database_engine:
- sqlite
- postgresql
- mysql
env:
- python: 2.7
django: 1.11
tox-env: py27-dj111
- python: 3.6
django: 1.11
tox-env: py36-dj111
- python: 3.6
django: 2.0
tox-env: py36-dj20
- python: 3.6
django: 2.1
tox-env: py36-dj21
- python: 3.6
django: 2.2
tox-env: py36-dj22
- python: 3.6
django: 3.0
tox-env: py36-dj30
- python: 3.6
django: 3.1
tox-env: py36-dj31
- python: 3.7
django: 1.11
tox-env: py37-dj111
- python: 3.7
django: 2.0
tox-env: py37-dj20
- python: 3.7
django: 2.1
tox-env: py37-dj21
- python: 3.7
django: 2.2
tox-env: py37-dj22
- python: 3.7
django: 3.0
tox-env: py37-dj30
- python: 3.7
django: 3.1
tox-env: py37-dj31
- python: 3.8
django: 1.11
tox-env: py38-dj111
- python: 3.8
django: 2.0
tox-env: py38-dj20
- python: 3.8
django: 2.1
tox-env: py38-dj21
- python: 3.8
django: 2.2
tox-env: py38-dj22
- python: 3.8
django: 3.0
tox-env: py38-dj30
- python: 3.8
django: 3.1
tox-env: py38-dj31
# - python: 3.9
# django: 1.11
# tox-env: py39-dj111
# - python: 3.9
# django: 2.0
# tox-env: py39-dj20
# - python: 3.9
# django: 2.1
# tox-env: py39-dj21
# - python: 3.9
# django: 2.2
# tox-env: py39-dj22
# - python: 3.9
# django: 3.0
# tox-env: py39-dj30
# - python: 3.9
# django: 3.1
# tox-env: py39-dj31
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.env.python }}
- name: Install dependencies
run: |
apt-get update
apt-get install --assume-yes python-dev postgresql-client default-mysql-client
- name: Setup Postgres database
run: |
psql -U postgres -h postgres -c "CREATE ROLE django_random_queryset LOGIN SUPERUSER PASSWORD 'password'"
psql -U postgres -h postgres -c "CREATE DATABASE django_random_queryset OWNER django_random_queryset"
env:
PGPASSWORD: password
- name: Setup MySQL database
run: |
mysql -u root -h mysql -e "create user django_random_queryset"
mysql -u root -h mysql -e "grant all on *.* to django_random_queryset"
mysql -h mysql -e "create database django_random_queryset"
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e ${{ matrix.env.tox-env }}
env:
DJANGO: ${{ matrix.env.django }}
POSTGRES_HOST: postgres
MYSQL_HOST: mysql
TEST_DATABASE_ENGINE: ${{ matrix.database_engine }}