From d0534882a672f7d524bd2a98e6f660a029f1ed63 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Thu, 11 Feb 2021 18:06:03 +0100 Subject: [PATCH] Switch from Travis CI and Coveralls to GH Actions and Codecov Free Travis CI is shutting down and since I already have Codecov set up in other projects instead of Coveralls I'm switching that too for consistency. There's no nightly so I left it out for now. --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 21 --------------------- README.md | 4 ++-- docs/index.rst | 9 +++++---- requirements-dev.txt | 1 - 5 files changed, 35 insertions(+), 28 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..575e4c5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + python-version: [3.6, 3.7, 3.8, 3.9, 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: | + pip install --upgrade -r requirements.txt -r requirements-dev.txt + pip install . + - name: Run tests + run: | + py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term + if which mypy; then mypy injector ; fi + if which black; then black --check . ; fi + - name: Report coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 405a1cc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false -language: python -cache: pip -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "nightly" - - "pypy3" -matrix: - allow_failures: - - python: "nightly" -install: - - pip install --upgrade -r requirements.txt -r requirements-dev.txt -script: - - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term - - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then mypy injector ; fi - - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then black --check . ; fi -after_success: - - coveralls diff --git a/README.md b/README.md index 3b6867d..1d49205 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ Injector - Python dependency injection framework, inspired by Guice =================================================================== -[![image](https://secure.travis-ci.org/alecthomas/injector.svg?branch=master)](https://travis-ci.org/alecthomas/injector) -[![Coverage Status](https://coveralls.io/repos/github/alecthomas/injector/badge.svg?branch=master)](https://coveralls.io/github/alecthomas/injector?branch=master) +[![image](https://github.com/alecthomas/injector/workflows/CI/badge.svg)](https://github.com/alecthomas/injector/actions?query=workflow%3ACI+branch%3Amaster) +[![Coverage Status](https://codecov.io/gh/alecthomas/injector/branch/master/graph/badge.svg)](https://codecov.io/gh/alecthomas/injector) Introduction ------------ diff --git a/docs/index.rst b/docs/index.rst index 893b400..a0290c8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,13 +6,14 @@ Welcome to Injector's documentation! ==================================== -.. image:: https://travis-ci.org/alecthomas/injector.png?branch=master +.. image:: https://github.com/alecthomas/injector/workflows/CI/badge.svg :alt: Build status - :target: https://travis-ci.org/alecthomas/injector + :target: https://github.com/alecthomas/injector/actions?query=workflow%3ACI+branch%3Amaster -.. image:: https://coveralls.io/repos/github/alecthomas/injector/badge.svg?branch=master +.. image:: https://codecov.io/gh/alecthomas/injector/branch/master/graph/badge.svg :alt: Covergage status - :target: https://coveralls.io/github/alecthomas/injector?branch=master + :target: https://codecov.io/gh/alecthomas/injector + GitHub (code repository, issues): https://github.com/alecthomas/injector diff --git a/requirements-dev.txt b/requirements-dev.txt index 953188b..8f68e3d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,4 @@ pytest -coveralls pytest-cov>=2.5.1 dataclasses;python_version<"3.7" mypy;implementation_name=="cpython"