Skip to content

Commit

Permalink
chore(ci): update pr tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Apr 24, 2024
1 parent c98a696 commit 8a4a5ea
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-on-pr-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion ui/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions ui/testing/vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -31,6 +42,7 @@ export default defineConfig(() => {
},

test: {
...getReporterConfig(),
globals: true,
environment: 'jsdom',
environmentOptions: {
Expand Down

0 comments on commit 8a4a5ea

Please sign in to comment.