Skip to content

Commit f875786

Browse files
committed
test(functional): start tracking functional test coverage
1 parent 1e6305e commit f875786

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
env:
5656
TOXENV: ${{ matrix.toxenv }}
5757
run: tox
58+
- name: Upload codecov coverage
59+
uses: codecov/codecov-action@v1
60+
with:
61+
files: ./coverage.xml
62+
flags: ${{ matrix.toxenv }}
63+
fail_ci_if_error: true
5864

5965
coverage:
6066
runs-on: ubuntu-20.04

codecov.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "70...100"
8+
9+
comment:
10+
layout: "diff,flags,files"
11+
behavior: default
12+
require_changes: yes
13+
14+
github_checks:
15+
annotations: true

tox.ini

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ omit = *tests*
7474

7575
[testenv:cli_func_v4]
7676
deps = -r{toxinidir}/docker-requirements.txt
77-
commands = pytest --script-launch-mode=subprocess tools/functional/cli {posargs}
77+
commands =
78+
pytest --cov gitlab --cov-report term --cov-report html --cov-report xml \
79+
--script-launch-mode=subprocess \
80+
tools/functional/cli {posargs}
7881

7982
[testenv:py_func_v4]
8083
deps = -r{toxinidir}/docker-requirements.txt
81-
commands = pytest tools/functional/api {posargs}
84+
commands =
85+
pytest --cov gitlab --cov-report term --cov-report html --cov-report xml \
86+
tools/functional/api {posargs}

0 commit comments

Comments
 (0)