Skip to content

Commit

Permalink
Add test results output and coverage output (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhouweling authored Dec 1, 2024
1 parent 61688b8 commit fb2ae03
Show file tree
Hide file tree
Showing 7 changed files with 726 additions and 4 deletions.
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

0 comments on commit fb2ae03

Please sign in to comment.