diff --git a/Jenkinsfile b/Jenkinsfile index d2b7859d9..69c8de932 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -97,7 +97,7 @@ pipeline { post { always { junit( - testResults: 'junitresults.xml', + testResults: 'junit/vitest.xml', allowEmptyResults: true ) } @@ -116,7 +116,7 @@ pipeline { def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') sh "docker-compose ${env.COMPOSE_PARAMS} up -d" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { - sh 'cypress run --browser chromium' + sh 'cypress run --browser chromium --spec test/cypress/integration/claim/claimAction.spec.js' } } } @@ -124,7 +124,7 @@ pipeline { always { sh "docker-compose ${env.COMPOSE_PARAMS} down" junit( - testResults: 'e2e-junitresults.xml', + testResults: 'junit/cypress.xml', allowEmptyResults: true ) } diff --git a/cypress.config.js b/cypress.config.js index 8e5f16517..bb21028cd 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,16 +4,14 @@ import { defineConfig } from 'cypress'; // https://www.npmjs.com/package/cypress-mochawesome-reporter let urlHost, - browser, reporter, reporterOptions; if (process.env.CI) { urlHost = 'front'; - browser = 'chromium'; reporter = 'junit'; reporterOptions = { - mochaFile: 'e2e-junitresults.xml', + mochaFile: 'junit/cypress.xml', toConsole: false, }; } else { diff --git a/vitest.config.js b/vitest.config.js index a465f0e2d..af12d8fb5 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -5,9 +5,21 @@ import jsconfigPaths from 'vite-jsconfig-paths'; import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'; import path from 'path'; +let reporters, + junit; + +if (process.env.CI) { + reporters = 'junit'; + junit = {outputFile: './junit/vitest.xml'}; +} else { + reporters = 'default'; +} + // https://vitejs.dev/config/ export default defineConfig({ test: { + reporters, + junit, environment: 'happy-dom', setupFiles: 'test/vitest/setup-file.js', include: [