diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a89cc59 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: CI + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python: [ 3.5, 3.6, 3.7, 3.8 ] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install dependencies + run: | + pip install django-honeypot + pip install tox tox-gh-actions + - name: Run tests + run: tox + - name: Coverage + if: ${{ matrix.python == 3.8 }} + run: | + pip install coverage[toml] + coverage run runtests.py + - name: Upload coverage + if: ${{ matrix.python == 3.8 }} + uses: codecov/codecov-action@v1 + with: + name: Python ${{ matrix.python }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4c6b6ee..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -language: python - -matrix: - fast_finish: true - allow_failures: - - env: DJANGO=master - include: - - python: 2.7 - env: DJANGO=1.11 - - - python: 3.5 - env: DJANGO=1.11 - - python: 3.5 - env: DJANGO=2.2 - - - python: 3.6 - env: DJANGO=1.11 - - python: 3.6 - env: DJANGO=2.2 - - python: 3.6 - env: DJANGO=3.0 - - python: 3.6 - env: DJANGO=master - - - python: 3.7 - env: DJANGO=2.2 - - python: 3.7 - env: DJANGO=3.0 - - python: 3.7 - env: DJANGO=master - - - - python: 3.8 - env: DJANGO=2.2 - - python: 3.8 - env: DJANGO=3.0 - - python: 3.8 - env: DJANGO=master - -install: - - pip install tox tox-travis -script: - - tox -after_success: - - pip install coveralls - - coveralls diff --git a/README.rst b/README.rst index 1606084..8c19982 100644 --- a/README.rst +++ b/README.rst @@ -18,11 +18,12 @@ django-envelope :target: https://pypi.python.org/pypi/django-envelope/ :alt: Wheel Status -.. image:: https://travis-ci.org/zsiciarz/django-envelope.png?branch=develop - :target: https://travis-ci.org/zsiciarz/django-envelope +.. image:: https://github.com/richardbarran/django-envelope/workflows/CI/badge.svg?branch=github-actions + :target: https://github.com/richardbarran/django-envelope/actions?workflow=CI + :alt: CI Status -.. image:: https://coveralls.io/repos/zsiciarz/django-envelope/badge.png - :target: https://coveralls.io/r/zsiciarz/django-envelope +.. image:: https://codecov.io/gh/richardbarran/django-envelope/branch/github-actions/graph/badge.svg?token=wRYvRp4xQL + :target: https://codecov.io/gh/richardbarran/django-envelope ``django-envelope`` is a simple contact form app for Django web framework. @@ -52,7 +53,6 @@ Resources * `Documentation `_ * `Issue tracker `_ - * `CI server `_ Authors ------- diff --git a/tox.ini b/tox.ini index 8691484..787e858 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,21 @@ [tox] envlist = - {py27,py35,py36}-django111, + {py35,py36}-django111, {py35,py36,py37,py38}-django22, - {py36,py37,py38}-django{30,master} + {py36,py37,py38}-django{30} [testenv] deps= django111: Django>=1.11,<2.0 django22: Django>=2.2,<3.0 django30: Django>=3.0,<4.0 - djangomaster: https://github.com/django/django/archive/master.tar.gz py{35,36,37,38}: django-honeypot - py27: django-honeypot<0.8 - py27: mock==3.0.5 - coverage -commands= coverage run ./runtests.py +commands= ./runtests.py -[travis:env] -DJANGO = - 1.11: django111 - 2.2: django22 - 3.0: django30 - master: djangomaster \ No newline at end of file +[gh-actions] +python = + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38