diff --git a/.github/workflows/tests-on-pr-report.yml b/.github/workflows/tests-on-pr-report.yml index c58c98607bf..c18f145228a 100644 --- a/.github/workflows/tests-on-pr-report.yml +++ b/.github/workflows/tests-on-pr-report.yml @@ -70,5 +70,5 @@ jobs: commit: ${{ github.event.workflow_run.head_sha }} event_file: event-data/event.json event_name: ${{ github.event.workflow_run.event }} - files: 'test-results/*.json' + files: 'test-results/*.xml' check_name: 'UI Tests Results' diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index 9859461afb0..4abddeae1e0 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -104,7 +104,7 @@ jobs: path: vite-plugin/dist - name: Run tests - run: pnpm test:workflow + run: pnpm test # Upload required artifacts to be used in tests-on-pr-report.yml diff --git a/ui/package.json b/ui/package.json index 33508e983ed..042d4e657cf 100644 --- a/ui/package.json +++ b/ui/package.json @@ -26,7 +26,6 @@ "lint": "eslint --ext .js,.cjs,.mjs,.vue ./ --fix --report-unused-disable-directives", "format:types": "prettier --write \"types/**/*.{d.ts,ts,json}\"", "test": "pnpm --filter quasar-ui-test test", - "test:workflow": "pnpm --filter quasar-ui-test test:workflow", "test:watch": "pnpm --filter quasar-ui-test test:watch", "test:watch:ui": "pnpm --filter quasar-ui-test test:watch:ui", "test:specs": "node ./testing/specs/script.js", diff --git a/ui/testing/package.json b/ui/testing/package.json index 8cc4650b963..8727393b417 100644 --- a/ui/testing/package.json +++ b/ui/testing/package.json @@ -4,7 +4,6 @@ "private": true, "scripts": { "test": "vitest run", - "test:workflow": "vitest run --reporter=json --outputFile=./test-results/vitest.json", "test:watch": "vitest watch", "test:watch:ui": "vitest watch --ui", "coverage": "vitest run --coverage" diff --git a/ui/testing/vitest.config.js b/ui/testing/vitest.config.js index 4de12230e38..825d11c34dd 100644 --- a/ui/testing/vitest.config.js +++ b/ui/testing/vitest.config.js @@ -9,6 +9,17 @@ const resolve = _path => join(rootFolder, _path) import { quasar, transformAssetUrls } from '@quasar/vite-plugin' +function getReporterConfig () { + if (process.env.GITHUB_ACTIONS) { + return { + outputFile: 'test-results/report.xml', + reporters: 'junit' + } + } + + return {} +} + export default defineConfig(() => { return { plugins: [ @@ -31,6 +42,7 @@ export default defineConfig(() => { }, test: { + ...getReporterConfig(), globals: true, environment: 'jsdom', environmentOptions: {