diff options
author | John Villalovos <john@sodarock.com> | 2021-05-06 12:26:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 12:26:11 -0700 |
commit | 0d3b8aea752f487db22f22be87de3cde247f9ffb (patch) | |
tree | 694804ed407720acc2039e7e6910457fa270fa63 | |
parent | 45edae9d65aced6fbd41fe68463418c6e4ca39ee (diff) | |
parent | dfa40c1ef85992e85c1160587037e56778ab49c0 (diff) | |
download | gitlab-0d3b8aea752f487db22f22be87de3cde247f9ffb.tar.gz |
Merge pull request #1440 from python-gitlab/test/functional-test-coverage
test(functional): start tracking functional test coverage
-rw-r--r-- | .github/workflows/test.yml | 6 | ||||
-rw-r--r-- | codecov.yml | 15 | ||||
-rw-r--r-- | tox.ini | 12 |
3 files changed, 30 insertions, 3 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01e604f..8002d36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..0a82dcd --- /dev/null +++ b/codecov.yml @@ -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 @@ -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} |