From 8529593c4234724455994fef9ebb1bb48fae7357 Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Mon, 11 Jan 2021 19:51:45 +0300 Subject: [PATCH] Jenkinsfile: run test --- build/Jenkinsfile | 76 +++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/build/Jenkinsfile b/build/Jenkinsfile index 67beae5cc7..9d45852300 100644 --- a/build/Jenkinsfile +++ b/build/Jenkinsfile @@ -60,40 +60,58 @@ pipeline { parallel { stage('Unix') { agent { label 'net-core' } - steps { - sh "sh ./build/scripts/components.sh && cd ${env.WORKSPACE}/web/ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true" - } - post { - success { - junit 'web/ASC.Web.Components/junit.xml' - publishHTML target: [ - allowMissing : false, - alwaysLinkToLastBuild: false, - keepAll : true, - reportDir : 'web/ASC.Web.Components/coverage/lcov-report', - reportFiles : 'index.html', - reportName : 'Unix Test Report' - ] - publishCoverage adapters: [coberturaAdapter('web/ASC.Web.Components/coverage/cobertura-coverage.xml')] + stages { + stage('Components') { + steps { + sh "sh ./build/scripts/components.sh && cd ${env.WORKSPACE}/web/ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true" + } + post { + success { + junit 'web/ASC.Web.Components/junit.xml' + publishHTML target: [ + allowMissing : false, + alwaysLinkToLastBuild: false, + keepAll : true, + reportDir : 'web/ASC.Web.Components/coverage/lcov-report', + reportFiles : 'index.html', + reportName : 'Unix Test Report' + ] + publishCoverage adapters: [coberturaAdapter('web/ASC.Web.Components/coverage/cobertura-coverage.xml')] + } + } + } + stage('Files') { + steps { + sh "cd ${env.WORKSPACE}/products/ASC.Files/Tests/ && dotnet test ASC.Files.Tests.csproj" + } } } } stage('Windows') { agent { label 'win-core' } - steps { - bat "sh build\\scripts\\components.sh && cd ${env.WORKSPACE}\\web\\ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true" - } - post { - success { - junit 'web\\ASC.Web.Components\\junit.xml' - publishHTML target: [ - allowMissing : false, - alwaysLinkToLastBuild: false, - keepAll : true, - reportDir : 'web\\ASC.Web.Components\\coverage\\lcov-report', - reportFiles : 'index.html', - reportName : 'Windows Test Report' - ] + stages { + stage('Components') { + steps { + bat "sh build\\scripts\\components.sh && cd ${env.WORKSPACE}\\web\\ASC.Web.Components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true" + } + post { + success { + junit 'web\\ASC.Web.Components\\junit.xml' + publishHTML target: [ + allowMissing : false, + alwaysLinkToLastBuild: false, + keepAll : true, + reportDir : 'web\\ASC.Web.Components\\coverage\\lcov-report', + reportFiles : 'index.html', + reportName : 'Windows Test Report' + ] + } + } + } + stage('Files') { + steps { + bat "cd ${env.WORKSPACE}\\products\\ASC.Files\\Tests\\ && dotnet test ASC.Files.Tests.csproj" + } } } }