diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23c8f34..96aceb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,10 +27,14 @@ jobs: working-directory: ./ui run: npm ci - - name: Run UI tests - working-directory: ./ui - run: npm test + - name: Run tests with coverage + run: npm run test:coverage + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: code-coverage-report + path: coverage/ - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/ui/package.json b/ui/package.json index 52f21dc..64c53c4 100644 --- a/ui/package.json +++ b/ui/package.json @@ -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",