mirror of
https://github.com/zadam/trilium.git
synced 2026-09-12 19:50:20 +05:00
ci(ckeditor5): upload aggregate package coverage to Codecov
CI never produced coverage for packages/ckeditor5 (it ran in the catch-all "rest of the tests" step without --coverage), and the codecov-action steps upload only explicit hardcoded paths — so the package never reached Codecov. - dev.yml: run the ckeditor5 browser-mode suite with --coverage in its own step (sharing the chromedriver setup the other CKEditor tests use), upload the lcov + junit results to Codecov under a new `ckeditor5` flag, and drop ckeditor5 from the no-coverage catch-all so it isn't run twice. - vitest.config.ts: emit junit results and write coverage to test-output/vitest/coverage (matches the other suites' convention and lands under the already-gitignored test-output/ instead of an untracked coverage/). - codecov.yml: add the `ckeditor5` flag scoped to packages/ckeditor5/src/. This also makes CI enforce the package's 100% coverage gate (the threshold already lived in vitest.config.ts but was never exercised under --coverage). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6d1351648f
commit
6f689920b4
25
.github/workflows/dev.yml
vendored
25
.github/workflows/dev.yml
vendored
@ -130,6 +130,29 @@ jobs:
|
||||
pnpm run --filter=ckeditor5-mermaid test
|
||||
pnpm run --filter=ckeditor5-math test
|
||||
|
||||
- name: Run the CKEditor 5 aggregate tests
|
||||
run: |
|
||||
export CHROMEDRIVER_PATH=$(which chromedriver || find /usr/local/share -name chromedriver -type f 2>/dev/null | head -1)
|
||||
echo "Using chromedriver at: $CHROMEDRIVER_PATH"
|
||||
pnpm run --filter=ckeditor5 test --coverage
|
||||
|
||||
- name: Upload ckeditor5 coverage to Codecov
|
||||
uses: codecov/codecov-action@v7
|
||||
if: always()
|
||||
with:
|
||||
files: packages/ckeditor5/test-output/vitest/coverage/lcov.info
|
||||
flags: ckeditor5
|
||||
fail_ci_if_error: false
|
||||
|
||||
- name: Upload ckeditor5 test results to Codecov
|
||||
uses: codecov/test-results-action@v1
|
||||
if: ${{ !cancelled() }}
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: packages/ckeditor5/test-output/vitest/junit.xml
|
||||
flags: ckeditor5
|
||||
fail_ci_if_error: false
|
||||
|
||||
- name: Run the desktop tests
|
||||
run: pnpm run --filter=desktop test --coverage
|
||||
|
||||
@ -171,7 +194,7 @@ jobs:
|
||||
fail_ci_if_error: false
|
||||
|
||||
- name: Run the rest of the tests
|
||||
run: pnpm run --filter=\!client --filter=\!standalone --filter=\!server --filter=\!desktop --filter=\!commons --filter=\!ckeditor5-mermaid --filter=\!ckeditor5-math test
|
||||
run: pnpm run --filter=\!client --filter=\!standalone --filter=\!server --filter=\!desktop --filter=\!commons --filter=\!ckeditor5-mermaid --filter=\!ckeditor5-math --filter=\!ckeditor5 test
|
||||
|
||||
build_docker:
|
||||
name: Build Docker image
|
||||
|
||||
@ -41,6 +41,10 @@ flags:
|
||||
paths:
|
||||
- packages/commons/src/
|
||||
carryforward: true
|
||||
ckeditor5:
|
||||
paths:
|
||||
- packages/ckeditor5/src/
|
||||
carryforward: true
|
||||
|
||||
comment:
|
||||
layout: "condensed_header, condensed_files, condensed_footer"
|
||||
|
||||
@ -13,6 +13,7 @@ export default defineConfig({
|
||||
include: ["src/**/*.spec.ts"],
|
||||
globals: true,
|
||||
watch: false,
|
||||
reporters: ["default", ["junit", { outputFile: "./test-output/vitest/junit.xml", addFileAttribute: true }]],
|
||||
coverage: {
|
||||
thresholds: {
|
||||
lines: 100,
|
||||
@ -21,6 +22,7 @@ export default defineConfig({
|
||||
statements: 100
|
||||
},
|
||||
provider: "v8",
|
||||
reportsDirectory: "./test-output/vitest/coverage",
|
||||
// Restrict to this package's own sources. The aggregate imports the sibling
|
||||
// @triliumnext/ckeditor5-* workspace packages, whose `src/` would otherwise bleed
|
||||
// into this report; they carry their own 100% coverage gates in their own packages.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user