From c1b14a317b3f4b456d5ef5ec37e9092d9881f297 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Wed, 24 Mar 2021 23:27:25 +0100 Subject: [PATCH] Switch from Travis CI/Coveralls to GH Actions/Codecov Travis CI free tier is going away and Codecov is my go-to code coverage service now. Closes GH-332. --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------- README.rst | 10 +++++----- docs/index.rst | 12 +++++------- requirements-dev.txt | 2 ++ 5 files changed, 45 insertions(+), 31 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 000000000..86cc95a7f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - "**" + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-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-dev.txt + pip install . + - name: Run tests + run: make ci + env: + SKIP_IPV6: 1 + - name: Report coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9d32a7f4..000000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9-dev" - - "pypy3" -matrix: - allow_failures: - - python: "3.9-dev" -install: - - pip install --upgrade -r requirements-dev.txt - # mypy can't be installed on pypy - - if [[ "${TRAVIS_PYTHON_VERSION}" != "pypy"* ]] ; then pip install black mypy ; fi -script: - # no IPv6 support in Travis :( - - SKIP_IPV6=1 make ci -after_success: - - coveralls diff --git a/README.rst b/README.rst index 4ec6e73f1..887fd8e49 100644 --- a/README.rst +++ b/README.rst @@ -1,14 +1,14 @@ python-zeroconf =============== -.. image:: https://travis-ci.org/jstasiak/python-zeroconf.svg?branch=master - :target: https://travis-ci.org/jstasiak/python-zeroconf - +.. image:: https://github.com/jstasiak/python-zeroconf/workflows/CI/badge.svg + :target: https://github.com/jstasiak/python-zeroconf?query=workflow%3ACI+branch%3Amaster + .. image:: https://img.shields.io/pypi/v/zeroconf.svg :target: https://pypi.python.org/pypi/zeroconf -.. image:: https://img.shields.io/coveralls/jstasiak/python-zeroconf.svg - :target: https://coveralls.io/r/jstasiak/python-zeroconf +.. image:: https://codecov.io/gh/jstasiak/python-zeroconf/branch/master/graph/badge.svg + :target: https://codecov.io/gh/jstasiak/python-zeroconf `Documentation `_. diff --git a/docs/index.rst b/docs/index.rst index 59952189e..de5ba41af 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,16 +1,14 @@ Welcome to python-zeroconf documentation! ========================================= -.. image:: https://travis-ci.org/jstasiak/python-zeroconf.svg?branch=master - :alt: Build status - :target: https://travis-ci.org/jstasiak/python-zeroconf +.. image:: https://github.com/jstasiak/python-zeroconf/workflows/CI/badge.svg + :target: https://github.com/jstasiak/python-zeroconf?query=workflow%3ACI+branch%3Amaster .. image:: https://img.shields.io/pypi/v/zeroconf.svg :target: https://pypi.python.org/pypi/zeroconf - -.. image:: https://coveralls.io/repos/github/jstasiak/python-zeroconf/badge.svg?branch=master - :alt: Covergage status - :target: https://coveralls.io/github/jstasiak/python-zeroconf?branch=master + +.. image:: https://codecov.io/gh/jstasiak/python-zeroconf/branch/master/graph/badge.svg + :target: https://codecov.io/gh/jstasiak/python-zeroconf GitHub (code repository, issues): https://github.com/jstasiak/python-zeroconf diff --git a/requirements-dev.txt b/requirements-dev.txt index 2d0490aed..8c1527b44 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,12 @@ autopep8 +black;implementation_name=="cpython" coveralls coverage # Version restricted because of https://github.com/PyCQA/pycodestyle/issues/741 flake8>=3.6.0 flake8-import-order ifaddr +mypy;implementation_name=="cpython" # 0.11.0 breaks things https://github.com/PyCQA/pep8-naming/issues/152 pep8-naming!=0.6.0,!=0.11.0 pytest