Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
ci: report codemirror, express-partial-content and highlightjs to Codecov
Elian Doran9e22530325e0
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.ymlindex cddeab69bf..41d2e2165c 100644--- a/.github/workflows/dev.yml+++ b/.github/workflows/dev.yml@@ -216,8 +216,68 @@ jobs:flags: commonsfail_ci_if_error: false+ - name: Run the codemirror tests+ run: pnpm run --filter=codemirror test --coverage++ - name: Upload codemirror coverage to Codecov+ uses: codecov/codecov-action@v7+ if: always()+ with:+ files: packages/codemirror/test-output/vitest/coverage/lcov.info+ flags: codemirror+ fail_ci_if_error: false++ - name: Upload codemirror test results to Codecov+ uses: codecov/test-results-action@v1+ if: ${{ !cancelled() }}+ with:+ token: ${{ secrets.CODECOV_TOKEN }}+ files: packages/codemirror/test-output/vitest/junit.xml+ flags: codemirror+ fail_ci_if_error: false++ - name: Run the express-partial-content tests+ run: pnpm run --filter=express-partial-content test --coverage++ - name: Upload express-partial-content coverage to Codecov+ uses: codecov/codecov-action@v7+ if: always()+ with:+ files: packages/express-partial-content/test-output/vitest/coverage/lcov.info+ flags: express-partial-content+ fail_ci_if_error: false++ - name: Upload express-partial-content test results to Codecov+ uses: codecov/test-results-action@v1+ if: ${{ !cancelled() }}+ with:+ token: ${{ secrets.CODECOV_TOKEN }}+ files: packages/express-partial-content/test-output/vitest/junit.xml+ flags: express-partial-content+ fail_ci_if_error: false++ - name: Run the highlightjs tests+ run: pnpm run --filter=highlightjs test --coverage++ - name: Upload highlightjs coverage to Codecov+ uses: codecov/codecov-action@v7+ if: always()+ with:+ files: packages/highlightjs/test-output/vitest/coverage/lcov.info+ flags: highlightjs+ fail_ci_if_error: false++ - name: Upload highlightjs test results to Codecov+ uses: codecov/test-results-action@v1+ if: ${{ !cancelled() }}+ with:+ token: ${{ secrets.CODECOV_TOKEN }}+ files: packages/highlightjs/test-output/vitest/junit.xml+ flags: highlightjs+ 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 --filter=\!ckeditor5 --filter=\!ckeditor5-utils test+ run: pnpm run --filter=\!client --filter=\!standalone --filter=\!server --filter=\!desktop --filter=\!commons --filter=\!ckeditor5-mermaid --filter=\!ckeditor5-math --filter=\!ckeditor5 --filter=\!ckeditor5-utils --filter=\!codemirror --filter=\!express-partial-content --filter=\!highlightjs testbuild_docker:name: Build Docker imagediff --git a/codecov.yml b/codecov.ymlindex 9c56719575..abfd49f628 100644--- a/codecov.yml+++ b/codecov.yml@@ -45,6 +45,22 @@ flags:paths:- packages/ckeditor5/src/carryforward: true+ ckeditor5-utils:+ paths:+ - packages/ckeditor5-utils/src/+ carryforward: true+ codemirror:+ paths:+ - packages/codemirror/src/+ carryforward: true+ express-partial-content:+ paths:+ - packages/express-partial-content/src/+ carryforward: true+ highlightjs:+ paths:+ - packages/highlightjs/src/+ carryforward: truecomment:layout: "condensed_header, condensed_files, condensed_footer"diff --git a/packages/codemirror/vite.config.ts b/packages/codemirror/vite.config.tsindex c342899d83..57f2212265 100644--- a/packages/codemirror/vite.config.ts+++ b/packages/codemirror/vite.config.ts@@ -31,7 +31,10 @@ export default defineConfig(() => ({globals: true,environment: 'happy-dom',include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],- reporters: ['default'],+ reporters: [+ 'default',+ ['junit', { outputFile: './test-output/vitest/junit.xml', addFileAttribute: true }]+ ],coverage: {provider: 'v8',include: ['src/**/*.{ts,tsx}'],diff --git a/packages/express-partial-content/vite.config.ts b/packages/express-partial-content/vite.config.tsindex 3443a6c67d..24840e4d66 100644--- a/packages/express-partial-content/vite.config.ts+++ b/packages/express-partial-content/vite.config.ts@@ -10,13 +10,16 @@ export default defineConfig(() => ({globals: true,environment: 'happy-dom',include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],- reporters: ['default'],+ reporters: [+ 'default',+ ['junit', { outputFile: './test-output/vitest/junit.xml', addFileAttribute: true }]+ ],coverage: {reportsDirectory: './test-output/vitest/coverage',provider: 'v8' as const,include: ['src/**/*.{ts,tsx}'],exclude: ['**/*.{test,spec}.{ts,mts,cts,tsx,js,jsx}', '**/*.d.ts'],- reporter: ['text'],+ reporter: ['text', 'lcov'],}},}));diff --git a/packages/highlightjs/vite.config.ts b/packages/highlightjs/vite.config.tsindex 02e2699cb9..8cb69a841e 100644--- a/packages/highlightjs/vite.config.ts+++ b/packages/highlightjs/vite.config.ts@@ -31,7 +31,10 @@ export default defineConfig(() => ({'globals': true,'environment': "happy-dom",'include': ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],- 'reporters': ["default"],+ 'reporters': [+ "default",+ ["junit", { outputFile: "./test-output/vitest/junit.xml", addFileAttribute: true }]+ ],'coverage': {'reportsDirectory': './test-output/vitest/coverage','provider': 'v8' as const,