Skip to content

test(functional): start tracking functional test coverage #1440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ jobs:
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Upload codecov coverage
uses: codecov/codecov-action@v1
with:
files: ./coverage.xml
flags: ${{ matrix.toxenv }}
fail_ci_if_error: true

coverage:
runs-on: ubuntu-20.04
Expand Down
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

comment:
layout: "diff,flags,files"
behavior: default
require_changes: yes

github_checks:
annotations: true
12 changes: 9 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,22 @@ commands = python setup.py build_sphinx

[testenv:cover]
commands =
pytest --cov gitlab --cov-report term --cov-report html \
pytest --cov --cov-report term --cov-report html \
--cov-report xml gitlab/tests {posargs}

[coverage:run]
omit = *tests*
source = gitlab

[pytest]
script_launch_mode = subprocess

[testenv:cli_func_v4]
deps = -r{toxinidir}/docker-requirements.txt
commands = pytest --script-launch-mode=subprocess tools/functional/cli {posargs}
commands =
pytest --cov --cov-report xml tools/functional/cli {posargs}

[testenv:py_func_v4]
deps = -r{toxinidir}/docker-requirements.txt
commands = pytest tools/functional/api {posargs}
commands =
pytest --cov --cov-report xml tools/functional/api {posargs}