Skip to content

Commit d82cc69

Browse files
committed
update workflow
1 parent 64b7547 commit d82cc69

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/ci_tests.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Python 3.8 with all optional dependencies
3131
os: ubuntu-latest
3232
python: 3.8
33-
toxenv: py38
33+
toxenv: py38-cov
3434

3535
- name: OS X - Python 3.8 with all optional dependencies
3636
os: macos-latest
@@ -58,9 +58,8 @@ jobs:
5858
- name: Test with tox
5959
run: |
6060
tox -e ${{ matrix.toxenv }}
61-
# This is an example of how to upload coverage to codecov
62-
# - name: Upload coverage to codecov
63-
# if: "contains(matrix.toxenv, '-cov')"
64-
# uses: codecov/codecov-action@v1
65-
# with:
66-
# file: ./coverage.xml
61+
- name: Upload coverage to codecov
62+
if: "contains(matrix.toxenv, '-cov')"
63+
uses: codecov/codecov-action@v1
64+
with:
65+
file: ./coverage.xml

tox.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tox]
2-
envlist = py38, flake8
2+
envlist =
3+
py38{,-cov}
4+
flake8
35

46
[testenv]
57
setenv =
@@ -11,7 +13,9 @@ deps =
1113
; -r{toxinidir}/requirements.txt
1214
commands =
1315
pip install -U pip
14-
pytest --basetemp={envtmpdir}
16+
!cov: pytest --basetemp={envtmpdir}
17+
cov: coverage run --source dash_component_template -m pytest
18+
cov: coverage xml -o {toxinidir}/coverage.xml
1519

1620
allowlist_externals = make
1721
/bin/bash

0 commit comments

Comments
 (0)