From 57e94f1d3c41262aaed1cbc0640eb2b0ca8402aa Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 9 May 2022 15:05:49 +0300 Subject: [PATCH] Switch to GitHub Actions CI Fixes #130 --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ .travis.yml | 36 ------------------------------------ tox.ini | 20 +++++++++++++++----- 3 files changed, 39 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c9d6630 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + Build: + runs-on: ubuntu-20.04 + strategy: + matrix: + include: + - python-version: '3.6' + - python-version: '3.10' + steps: + - name: 'Set up Python ${{ matrix.python-version }}' + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python-version }}' + - uses: actions/checkout@v2 + - run: pip install -U pip wheel setuptools tox tox-gh-actions + - run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 91a40f4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -sudo: false -language: python -dist: xenial -matrix: - include: - - python: '3.6' - env: TOXENV=py36-django22 - - python: '3.7' - env: TOXENV=py37-django22 - - python: '3.8' - env: TOXENV=py38-django22 - - python: '3.9' - env: TOXENV=py39-django22 - - - python: '3.6' - env: TOXENV=py36-django30 - - python: '3.7' - env: TOXENV=py37-django30 - - python: '3.8' - env: TOXENV=py38-django30 - - python: '3.9' - env: TOXENV=py39-django30 - - - python: '3.6' - env: TOXENV=py36-django31 - - python: '3.7' - env: TOXENV=py37-django31 - - python: '3.8' - env: TOXENV=py38-django31 - - python: '3.9' - env: TOXENV=py39-django31 - -install: - - pip install -U pip wheel setuptools - - pip install tox -script: tox diff --git a/tox.ini b/tox.ini index 08373f0..433b654 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = - py{36,37,38,39}-django{22,30,31} + py{36,37,38}-django{22,30,31} + py{38,39,310}-django{40} [testenv] setenv = PYTHONPATH = {toxinidir} @@ -8,7 +9,16 @@ commands = py.test -s tests --cov=enumfields --cov-report=term-missing deps = djangorestframework>=3.7 pytest-django - pytest-coverage - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 + pytest-cov + django22: Django~=2.2.0 + django30: Django~=3.0.0 + django31: Django~=3.1.0 + django40: Django~=4.0.0 + +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310