Skip to content

Commit

Permalink
add coverage to ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Terézia Slanináková committed Oct 1, 2024
1 parent 4c0f312 commit a15862f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,20 @@ jobs:

- name: Install UI dependencies
working-directory: ./ui
run: npm ci
run: |
npm ci
npm install --save-dev @vitest/coverage-v8
- name: Run UI tests
- name: Run tests with coverage
working-directory: ./ui
run: npm test
run: npm run test:coverage

- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: ui/coverage/

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down
2 changes: 1 addition & 1 deletion ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest"
"test": "vitest",
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.1",
Expand Down Expand Up @@ -49,6 +50,6 @@
"sass": "^1.69.5",
"typescript": "^5.3.3",
"vite": "^5.0.8",
"vitest": "^1.2.1"
"vitest": "^2.1.1"
}
}

0 comments on commit a15862f

Please sign in to comment.