Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Fix CI errors (#101)
Browse files Browse the repository at this point in the history
* Update CI configurations

- Drop py35 test on Travis
- Change travis CI OS to bionic
- Change pypy version
- Run Tox test on GHA

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Travis: introduce NO_COVERAGE env var

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* GHA: fix coveralls push reporting

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* GHA: setup python when finish

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Jul 22, 2020
1 parent 0a680c1 commit d0ad75f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/run-tox-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run Tox tests

on: push
on: [push, pull_request]

jobs:
build:
Expand All @@ -20,6 +20,28 @@ jobs:
- name: Install dependencies
run: |
pip install -U pip
pip install tox tox-gh-actions
pip install tox tox-gh-actions coveralls
- name: Test project with tox
run: tox
- name: Upload Coverage
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}-${{ matrix.os }}
finish:
runs-on: ubuntu-latest
name: finish parallel build
needs: build
steps:
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.8
architecture: x64
- name: Tell Coveralls that the parallel build is finished
run: |
pip install -U coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 13 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
language: python
dist: xenial
dist: bionic
sudo: false
cache: pip
matrix:
include:
- python: 3.5
env: TOXENV=py35
- python: 3.8
env: TOXENV=check
env: TOXENV=check PYTEST_NO_COVERAGE=1
- python: 3.8
env: TOXENV=docs
env: TOXENV=docs PYTEST_NO_COVERAGE=1
- python: 3.8
env: TOXENV=mypy
- python: pypy3.6-7.1.1
env: TOXENV=mypy PYTEST_NO_COVERAGE=1
- python: pypy3.6-7.2.0
env: TOXENV=pypy3

install:
Expand All @@ -23,7 +21,11 @@ script:
- tox

after_success:
# Hack for coveralls to find sources
- sed -E -ie 's/.tox.py(27|35|36|37|38|py3).(lib.python[2-3].[0-9].)?site-packages/src/g' .coverage
- coveralls

after_success:
- |
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
# Hack for coveralls to find sources
sed -E -ie 's/.tox.py(36|37|38|py3).(lib.python[2-3].[0-9].)?site-packages/src/g' .coverage
coverage xml --ignore-errors
coveralls
fi
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ passenv =
PATH
APPVEYOR APPVEYOR_*
TRAVIS TRAVIS_*
COVERALLS_*
commands = pytest -vv
depends =
{py35,py36,py37,py38,pypy3}: clean
Expand Down

0 comments on commit d0ad75f

Please sign in to comment.