From 29906e8c50072e4009291646d28b9a58bc75c489 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 25 Aug 2021 08:04:01 -0700 Subject: [PATCH] Move CI to GitHub actions Travis has ceased working and no longer supports open source projects. Switch to the popular and well support GitHub actions. Runs tests and mypy as before. --- .github/workflows/ci.yaml | 48 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 13 ----------- Makefile | 3 --- README.rst | 4 ++-- setup.cfg | 1 + tox.ini | 6 ++--- 6 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..42c20ab1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,48 @@ +name: CI + +on: + - pull_request + - push + +jobs: + mypy: + name: mypy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Set up Python + uses: actions/setup-python@v2 + + - name: Install tox + run: pip install tox + + - name: Run tests + run: tox -e mypy + + tests: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + - pypy3 + + steps: + - uses: actions/checkout@master + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install tox + run: pip install tox + + - name: Run tests + run: tox -e py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a4e6c194..00000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: python -python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - pypy3 - -install: pip install tox-travis -script: - tox -after_success: - - coveralls diff --git a/Makefile b/Makefile index 478e2873..db4b591a 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,6 @@ test: rm -f .coverage pytest -travis: - pytest --cov - tag: python create_tag.py diff --git a/README.rst b/README.rst index 501ad16a..5fa023ef 100644 --- a/README.rst +++ b/README.rst @@ -3,8 +3,8 @@ FreezeGun: Let your Python tests travel through time .. image:: https://img.shields.io/pypi/v/freezegun.svg :target: https://pypi.python.org/pypi/freezegun/ -.. image:: https://secure.travis-ci.org/spulec/freezegun.svg?branch=master - :target: https://travis-ci.org/spulec/freezegun +.. image:: https://github.com/spulec/freezegun/workflows/CI/badge.svg + :target: https://github.com/spulec/freezegun/actions .. image:: https://coveralls.io/repos/spulec/freezegun/badge.svg?branch=master :target: https://coveralls.io/r/spulec/freezegun diff --git a/setup.cfg b/setup.cfg index cb21a7e3..0647c003 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy diff --git a/tox.ini b/tox.ini index 6c6da20a..917e9368 100644 --- a/tox.ini +++ b/tox.ini @@ -4,13 +4,13 @@ # and then run "tox" from this directory. [tox] -envlist = py36, py37, py38, pypy3, py{38}-mypy +envlist = py36, py37, py38, py39, pypy3, mypy [testenv] commands = pytest --cov {posargs} deps = -rrequirements.txt -[testenv:py38-mypy] +[testenv:mypy] deps = - mypy == 0.902 + mypy commands = mypy freezegun