From 987268dcf3c3a41350f4822286838c4678a3c84f Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sat, 1 May 2021 11:08:51 +0200 Subject: [PATCH] Move all reports into a common directory --- .travis.yml | 2 +- Jenkinsfile | 12 ++++++------ tox.ini | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index e67dea891..c089adf22 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Jenkinsfile b/Jenkinsfile index 6a3ea8ed7..f2e0af46a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' diff --git a/tox.ini b/tox.ini index 4af86b4bc..a391d61c3 100644 --- a/tox.ini +++ b/tox.ini @@ -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}