Skip to content

Commit

Permalink
Merge pull request #117 from hugovk/gha-codecov
Browse files Browse the repository at this point in the history
GHA: Send coverage to Codecov
  • Loading branch information
hugovk authored Mar 5, 2020
2 parents 86447e1 + 3d4bd22 commit c2be521
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ jobs:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
# Include new variables for Codecov
- os: ubuntu-latest
codecov-flag: GHA_Ubuntu
- os: macOS-latest
codecov-flag: GHA_macOS
- os: windows-latest
codecov-flag: GHA_Windows

steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -61,3 +69,11 @@ jobs:
shell: bash
run: |
tox -e py
- name: Upload coverage
if: success()
run: |
curl -s https://codecov.io/bash -o codecov.sh
bash codecov.sh -F ${{ matrix.codecov-flag }}
env:
CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ script:
- tox

after_success:
- pip install -U codecov && codecov
- pip install -U codecov && codecov --flags TravisCI
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist =
extras =
tests
commands =
{envpython} -m pytest --cov humanize --cov tests {posargs}
{envpython} -m pytest --cov humanize --cov tests --cov-report xml {posargs}

[testenv:lint]
deps = pre-commit
Expand Down

0 comments on commit c2be521

Please sign in to comment.