From f8c8a0954040b8ca60aff9e196ed7ac2326ad269 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 15 Dec 2020 15:40:04 -0500 Subject: [PATCH] move to github actions (#43) * move to github actions * tox -v * test in pypy3 too * [gh-actions] * right? * and readme --- .github/workflows/python.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 14 -------------- README.rst | 8 ++------ tox.ini | 17 ++++++++--------- 4 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/python.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..0d77228 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,27 @@ +# Based on +# https://pypi.org/project/tox-gh-actions/ + +name: Python + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.5, 3.6, 3.7, 3.8, "pypy3"] + + 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 tox tox-gh-actions + - name: Test with tox + run: tox -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cdc1f4c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -dist: xenial -language: python -matrix: - include: - - python: "3.5" - - python: "3.6" - - python: "3.7" - - python: pypy3 -cache: pip -install: - - pip install tox-travis -script: tox -v -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.rst b/README.rst index 17077cd..8fbbb42 100644 --- a/README.rst +++ b/README.rst @@ -4,18 +4,14 @@ django-cache-memoize * License: MPL 2.0 -.. image:: https://travis-ci.org/peterbe/django-cache-memoize.svg?branch=master +.. image:: https://github.com/peterbe/django-cache-memoize/workflows/Python/badge.svg :alt: Build Status - :target: https://travis-ci.org/peterbe/django-cache-memoize + :target: https://github.com/peterbe/django-cache-memoize/actions?query=workflow%3APython .. image:: https://readthedocs.org/projects/django-cache-memoize/badge/?version=latest :alt: Documentation Status :target: https://django-cache-memoize.readthedocs.io/en/latest/?badge=latest -.. image:: https://codecov.io/gh/peterbe/django-cache-memoize/branch/master/graph/badge.svg - :alt: Code Coverage - :target: https://codecov.io/gh/peterbe/django-cache-memoize - .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black diff --git a/tox.ini b/tox.ini index 7d79054..4c057e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,4 @@ [tox] -skipsdist = True -usedevelop = True -minversion = 1.8 envlist = lint-py36, readme-py36, @@ -12,13 +9,15 @@ envlist = py38-django{22,30}, pypy3-django{111,20,21,22}, +[gh-actions] +python = + 3.5: py35 + 3.6: py36 + 3.7: py37 + 3.8: py38, lint, restlint + pypy3: pypy3 + [testenv] -basepython = - py35: python3.5 - py36: python3.6 - py37: python3.7 - py38: python3.8 - pypy3: pypy3 usedevelop = true setenv = DJANGO_SETTINGS_MODULE = tests.settings