Modify unit-ci to upload coverage

This commit is contained in:
vorotamoroz 2026-03-03 13:22:17 +00:00
parent cf9d2720ce
commit 62f78b4028
No known key found for this signature in database
GPG key ID: A51445513C5FCC34
2 changed files with 13 additions and 5 deletions

View file

@ -30,8 +30,16 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install test dependencies (Playwright Chromium)
run: npm run test:install-dependencies
# unit tests do not require Playwright, so we can skip installing its dependencies to save time
# - name: Install test dependencies (Playwright Chromium)
# run: npm run test:install-dependencies
- name: Run unit tests suite
run: npm run test:unit
- name: Run unit tests suite with coverage
run: npm run test:unit:coverage
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/**

View file

@ -26,7 +26,7 @@ export default mergeConfig(
...importOnlyFiles,
],
provider: "v8",
reporter: ["text", "json", "html"],
reporter: ["text", "json", "html", ["text", { file: "coverage-text.txt" }]],
},
},
})