Skip to content

Build your personal knowledge base with Trilium Notes

ci(ckeditor5): upload aggregate package coverage to Codecov

Elian Doran6f689920b425
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index 43ab116bc2..fef27e8bfb 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -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
diff --git a/codecov.yml b/codecov.yml
index 62cc8c793c..9c56719575 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -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"
diff --git a/packages/ckeditor5/vitest.config.ts b/packages/ckeditor5/vitest.config.ts
index 467997e19a..235985fc44 100644
--- a/packages/ckeditor5/vitest.config.ts
+++ b/packages/ckeditor5/vitest.config.ts
@@ -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.