Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test results output and coverage output #29

Merged
merged 5 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
name: Run Test
runs-on: ubuntu-latest

permissions:
contents: read
checks: write
pull-requests: write

steps:
- name: Check out Git repository
uses: actions/checkout@v4
Expand All @@ -33,4 +38,16 @@ jobs:
run: npm run build:generate-types

- name: Run test
run: npm run test
run: npx vitest --coverage.enabled true

- name: Publish test results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
comment_mode: off
files: |
test-results/**/*.xml

- name: Report Coverage
if: always()
uses: davelosert/vitest-coverage-report-action@v2
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ jspm_packages/
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

scripts/*.json
# don't save any of the json files that may have fetched in the scripts run
scripts/*.json

# test output for vitest to use in publish to github action
test-results
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"recommendations": ["streetsidesoftware.code-spell-checker", "esbenp.prettier-vscode", "tamasfe.even-better-toml"]
"recommendations": [
"streetsidesoftware.code-spell-checker",
"esbenp.prettier-vscode",
"tamasfe.even-better-toml",
"vitest.explorer"
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true
"editor.formatOnPaste": true,
"vitest.shellType": "terminal"
}
Loading