Move all reports into a common directory

This commit is contained in:
Tobias Gruetzmacher 2021-05-01 11:08:51 +02:00
parent 2002a5f61a
commit 987268dcf3
3 changed files with 11 additions and 11 deletions

View file

@ -21,7 +21,7 @@ install:
# command to run tests
script: tox
after_success:
- codecov --file .tox/cov-*.xml
- codecov --file .tox/reports/*/coverage.xml
- "if [ -n \"$CC_TEST_REPORTER_ID\" ]; then ./cc-test-reporter format-coverage --prefix $PWD/.tox/*/lib/*/site-packages --input-type coverage.py .tox/cov-*.xml; fi"
- "if [ -n \"$CC_TEST_REPORTER_ID\" ]; then ./cc-test-reporter upload-coverage; fi"
notifications:

12
Jenkinsfile vendored
View file

@ -48,8 +48,8 @@ pys.each { py ->
if (py.main) {
archiveArtifacts artifacts: 'dist/*', fingerprint: true
stash includes: 'dist/*.tar.gz', name: 'bin'
dir('.tox') {
stash includes: 'allure-*/**', name: 'allure'
dir('.tox/reports') {
stash includes: '*/allure-data/**', name: 'allure-data'
}
def buildVer = findFiles(glob: 'dist/*.tar.gz')[0].name.replaceFirst(/\.tar\.gz$/, '')
currentBuild.description = buildVer
@ -57,14 +57,14 @@ pys.each { py ->
publishCoverage calculateDiffForChangeRequests: true,
sourceFileResolver: sourceFiles('STORE_LAST_BUILD'),
adapters: [
coberturaAdapter('.tox/cov-*.xml')
coberturaAdapter('.tox/reports/*/coverage.xml')
]
recordIssues sourceCodeEncoding: 'UTF-8',
referenceJobName: 'dosage/master',
tool: flake8(pattern: '.tox/flake8.log', reportEncoding: 'UTF-8')
}
junit '.tox/junit-*.xml'
junit '.tox/reports/*/junit.xml'
}
}
}
@ -122,8 +122,8 @@ def processAllure() {
warnError('allure report failed') {
node {
deleteDir()
unstash 'allure'
sh 'mv allure-* allure-data'
unstash 'allure-data'
sh 'mv */allure-data .'
copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME, selector: lastWithArtifacts()
if (fileExists('allure-history.zip')) {
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'

View file

@ -4,14 +4,14 @@ envlist = py36, py37, py38, py39, flake8
[testenv]
commands =
{envbindir}/py.test --tb=short \
--junitxml={toxworkdir}/junit-{envname}.xml \
--alluredir={toxworkdir}/allure-{envname} \
--junitxml={toxworkdir}/reports/{envname}/junit.xml \
--alluredir={toxworkdir}/reports/{envname}/allure-data \
--cov={envsitepackagesdir}/dosagelib \
--cov-branch \
--cov-config=tox.ini \
--cov-report=term \
--cov-report=xml:{toxworkdir}/cov-{envname}.xml \
--cov-report=html:{toxworkdir}/cov-{envname} \
--cov-report=xml:{toxworkdir}/reports/{envname}/coverage.xml \
--cov-report=html:{toxworkdir}/reports/{envname}/htmlcov \
{posargs}