Skip to content

Commit

Permalink
show test summary in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jul 19, 2024
1 parent 6806c47 commit 9f8d3c8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .azure/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
displayName: gitversion/execute
workingDirectory: dist/vsix
- pwsh: |
npm run test
npm run test:ci
displayName: 'Run tests'
- pwsh: |
echo "Major (major) : $(major)"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ jobs:
overrideConfig: |
update-build-number=false
- run: |
npm run test
npm run test:ci
name: Run tests
- name: Test Summary
uses: test-summary/[email protected]
with:
paths: junit-report.xml
- run: |
echo "Major (env.major) : ${{ env.major }}"
echo "Major (env.GitVersion_Major) : ${{ env.GitVersion_Major }}"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ dist-ssr
/dist/agents/local/

.debug/

junit-report.xml
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"run:azure:gitreleasemanager": "node dist/tools/cli.mjs --tool gitreleasemanager --agent azure",
"run:github:gitreleasemanager": "node dist/tools/cli.mjs --tool gitreleasemanager --agent github",

"test:ci": "vitest --run src/__tests__ --config src/__tests__/vitest.config.ts",
"test:tools": "vitest --run src/__tests__/tools --config src/__tests__/vitest.config.ts",
"test:agents": "vitest --run src/__tests__/agents --config src/__tests__/vitest.config.ts",

Expand Down
6 changes: 5 additions & 1 deletion src/__tests__/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const config = defineConfig({
globals: true,
include: ['**/__tests__/**/*.spec.[tj]s'],
exclude: ['**/node_modules/**', '**/dist/**'],
testTimeout: 60000
reporters: ['junit'],
testTimeout: 60000,
outputFile: {
junit: './junit-report.xml'
}
}
})
export default config

0 comments on commit 9f8d3c8

Please sign in to comment.