Skip to content

Commit

Permalink
Add codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Nov 20, 2020
1 parent f2d51d7 commit 2864281
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [2.7, 3.5, 3.6, 3.7, 3.8]
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,10 @@ jobs:
run: |
tox -e pylint
tox -e py
- name: Codecov
if: matrix.python == 3.7 && matrix.os == 'ubuntu-latest'
run: |
tox -e codecov
- uses: codecov/codecov-action@v1
if: matrix.os == 'ubuntu-latest'
with:
file: ./coverage.xml # optional
name: py${{ matrix.python-version }}-${{ matrix.env.TOXENV }}-${{ matrix.os }}
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
16 changes: 1 addition & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ envlist = py{27,34,35,36,37,38},pylint
commands =
pip install -e .
coverage run -m unittest discover -s {posargs:test}
coverage xml
skip_install = True
deps =
mock
Expand All @@ -13,21 +14,6 @@ deps =
setenv =
LANG=en_US.UTF-8
AWS_DEFAULT_REGION=us-east-1
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage.{envname}}

[testenv:codecov]
deps =
coverage
codecov
skip_install = True
passenv = CI TRAVIS TRAVIS_*
setenv =
COVERAGE_FILE=.coverage
commands =
coverage erase
coverage combine
coverage report
codecov

[testenv:pylint]
deps =
Expand Down

0 comments on commit 2864281

Please sign in to comment.