Merge "Create Zuul job for unit test coverage"
This commit is contained in:
+14
@@ -11,6 +11,7 @@
|
||||
- stx-distcloud-client-tox-py39
|
||||
- stx-distcloud-client-tox-pylint
|
||||
- stx-distcloud-client-tox-black
|
||||
- stx-distcloud-client-tox-cover
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
@@ -18,6 +19,7 @@
|
||||
- stx-distcloud-client-tox-py39
|
||||
- stx-distcloud-client-tox-pylint
|
||||
- stx-distcloud-client-tox-black
|
||||
- stx-distcloud-client-tox-cover
|
||||
post:
|
||||
jobs:
|
||||
- stx-distcloud-client-upload-git-mirror
|
||||
@@ -70,6 +72,18 @@
|
||||
tox_envlist: black_check
|
||||
tox_extra_args: -c distributedcloud-client/tox.ini
|
||||
|
||||
- job:
|
||||
name: stx-distcloud-client-tox-cover
|
||||
parent: tox
|
||||
description: Run coverage test for distcloud-client
|
||||
nodeset: debian-bullseye
|
||||
vars:
|
||||
python_version: 3.9
|
||||
tox_envlist: cover
|
||||
tox_extra_args: -c distributedcloud-client/tox.ini
|
||||
post-run: tools/gate/playbooks/fetch-coverage.yaml
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: stx-distcloud-client-upload-git-mirror
|
||||
parent: upload-git-mirror
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py39,pep8,pylint,black_check
|
||||
envlist = py39,pep8,pylint,black_check,cover
|
||||
minversion = 4.4.0
|
||||
skipsdist = True
|
||||
toxworkdir = /tmp/{env:USER}_dc_client_tox
|
||||
@@ -78,7 +78,7 @@ commands =
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
coverage report --fail-under=75
|
||||
|
||||
[testenv:debug]
|
||||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- hosts: "{{ target_hosts | default('all') }}"
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Collect coverage artifacts
|
||||
synchronize:
|
||||
src: "{{ zuul.project.src_dir }}/distributedcloud-client/{{ item }}"
|
||||
dest: "{{ zuul.executor.log_root }}/{{ item }}"
|
||||
mode: pull
|
||||
copy_links: true
|
||||
verify_host: true
|
||||
loop:
|
||||
- cover/
|
||||
- .coverage
|
||||
ignore_errors: true
|
||||
@@ -33,6 +33,9 @@ description = Dummy environment to allow black to be run in subdir tox
|
||||
[testenv:black_check]
|
||||
description = Dummy environment to allow black_check to be run in subdir tox
|
||||
|
||||
[testenv:cover]
|
||||
description = Dummy environment to allow cover to be run in subdir tox
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands =
|
||||
|
||||
Reference in New Issue
Block a user