Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Nov 8, 2020
1 parent b4859a2 commit a68c17e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 36 deletions.
45 changes: 9 additions & 36 deletions .github/workflows/ci.yml
Expand Up @@ -12,37 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# https://docs.djangoproject.com/en/stable/faq/install/#what-python-version-can-i-use-with-django
versions:
# Linting
- tox: flake8
python: 3.6
- tox: readme
python: 3.6

# Django 1.11
- tox: py27-dj111
python: 2.7
- tox: py35-dj111
python: 3.5
- tox: py36-dj111
python: 3.6

# Django 2.0
- tox: py35-dj20
python: 3.5
- tox: py36-dj20
python: 3.6
- tox: py37-dj20
python: 3.7

# Django 2.1
- tox: py35-dj21
python: 3.5
- tox: py36-dj21
python: 3.6
- tox: py37-dj21
python: 3.7
python-version: [2.7, 3.6, 3.7]
django: [1.11, 2.0, 2.1]

# TODO: test on mac OS & windows?
os:
Expand All @@ -53,7 +24,7 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.versions.python }}
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
Expand All @@ -64,18 +35,20 @@ jobs:
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.os }}-${{ matrix.versions.python }}-v1-${{ hashFiles('**/setup.py') }}
${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.django }}-v1-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.versions.python }}-v1-
${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.django }}-v1-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U tox
python -m pip install -U tox tox-gh-actions
- name: Tox tests
shell: bash
run: tox -e ${{ matrix.versions.tox }}
run: tox
env:
DJANGO: ${{ matrix.django }}

deploy:
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Expand Up @@ -8,6 +8,19 @@ envlist =
readme
skipsdist = True

[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36,flake8,readme
3.7: py37

[gh-actions:env]
DJANGO =
1.11: dj111
2.0: dj20
2.1: dj21

[testenv]
deps =
dj111: Django>=1.11,<1.12
Expand Down

0 comments on commit a68c17e

Please sign in to comment.