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 ca1ee96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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
3 changes: 2 additions & 1 deletion 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

0 comments on commit ca1ee96

Please sign in to comment.