ci: refs #6695 JUnit report fixes
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Juan Ferrer 2025-02-21 12:01:28 +01:00
parent 9350c512ff
commit 22a173b7f7
3 changed files with 16 additions and 6 deletions

6
Jenkinsfile vendored
View File

@ -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
)
}

View File

@ -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 {

View File

@ -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: [