Skip to content

Commit

Permalink
Replace travis with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-s committed Nov 7, 2020
1 parent 4df6637 commit f399064
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 82 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Running unittests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
django: ["2.2", "3.0", "3.1"]

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
pip install -r requirements-tests.txt
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run unittests
env:
TOX_ENV: py${{ matrix.python-version}}-django${{ matrix.django }}
run: |
tox -e $TOX_ENV
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

14 changes: 8 additions & 6 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
pep8
coverage
django-storages
flake8
mock
pep8
psycopg2
pylint
coverage
python-dotenv
python-gnupg
django-storages
pytz
testfixtures
mock
python-dotenv
psycopg2
tox-gh-actions
tox
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ deps =
-rrequirements-tests.txt
django2.2: Django>=2.2,<2.3
django3.0: Django>=3.0,<3.1
django3.1: Django>=3.1,<3.2
djangomaster: https://github.com/django/django/archive/master.zip
commands = {posargs:coverage run runtests.py}

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38

[testenv:lint]
basepython = python
deps =
Expand Down

0 comments on commit f399064

Please sign in to comment.