Skip to content

Commit 092e6bb

Browse files
committed
Implement codecov github action
1 parent fa9c275 commit 092e6bb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: CI
2-
3-
env:
4-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5-
6-
on:
7-
push:
8-
9-
2+
on: [push]
103
jobs:
114
build:
125
runs-on: ubuntu-latest
@@ -16,18 +9,25 @@ jobs:
169
version: [2.7, 3.6, 3.8]
1710

1811
steps:
19-
- uses: actions/checkout@v2
12+
- name: Checkout
13+
uses: actions/checkout@v2
2014
- name: Set up Python ${{ matrix.python-version }}
2115
uses: actions/setup-python@v2
2216
with:
2317
python-version: ${{ matrix.version }}
2418
- name: Install Dependencies
2519
run: |
2620
python -m pip install --upgrade pip
27-
pip install pytest mock codecov
28-
python setup.py install
21+
pip install pytest mock pytest-cov
22+
pytest --cov=./ --cov-report=xml
23+
python setup.py install
2924
- name: Run Tests
3025
run: |
31-
coverage run -m pytest -v
32-
- name: Upload to codecov.io
33-
run: bash <(curl -s https://codecov.io/bash)
26+
python -m pytest -v
27+
- name: upload coverage to Codecov
28+
uses: codecov/codecov-action@v1
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
name: codecov-umbrella
32+
fail_ci_if_error: true
33+
verbose: true

0 commit comments

Comments
 (0)