From fc7b6a684611afbe0786f7d713045a927102fb8a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 7 Sep 2026 23:31:58 +0200 Subject: [PATCH] ci: follow vitest 5's project uniqueness and blob report path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two breakages that the typecheck failure was hiding, since every step after it in the "Test development" job was skipped and the CKEditor job never got as far as uploading anything. The root config globs both `packages/*/vitest.config.ts` and `packages/*/vite.config.ts`. ckeditor5 is the only package with both, and its vite.config.ts merely builds the library — it declares no tests at all. Vitest 4 registered it anyway as a second project sharing the package's name; vitest 5 rejects the duplicate outright and `pnpm scripts:test` cannot start: Error: Project name "@triliumnext/ckeditor5" from "packages/ckeditor5/vitest.config.ts" is not unique. Blob reports also moved from `.vitest-reports/` to `.vitest/blob/`, alongside the attachments that moved to `.vitest/`. The shard jobs were writing them where nothing looked, so the upload failed with "No files were found" — after the tests themselves had passed. The merge job reads the same path and would have failed next. Verified by running what CI runs: both shards, then `--mergeReports --coverage`, which replays 127 files / 1626 tests and clears the gate at 99.91/99.54/100/99.98. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/dev.yml | 6 +++--- vitest.config.ts | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f6a7d2f435..31c929ec28 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -452,7 +452,7 @@ jobs: --coverage.thresholds.lines=0 --coverage.thresholds.functions=0 \ --coverage.thresholds.branches=0 --coverage.thresholds.statements=0 - # Vitest names blobs `.vitest-reports/blob--.json`, so the two + # Vitest names blobs `.vitest/blob/blob--.json`, so the two # shards produce distinct filenames and merge-multiple cannot clobber them. # That directory is dot-prefixed, and upload-artifact skips hidden paths # unless told otherwise — without include-hidden-files it silently matches @@ -462,7 +462,7 @@ jobs: if: ${{ !cancelled() && steps.test-ckeditor5.outcome == 'success' }} with: name: ckeditor5-blob-${{ matrix.shard }} - path: packages/ckeditor5/.vitest-reports/ + path: packages/ckeditor5/.vitest/blob/ include-hidden-files: true if-no-files-found: error retention-days: 1 @@ -500,7 +500,7 @@ jobs: with: pattern: ckeditor5-blob-* merge-multiple: true - path: packages/ckeditor5/.vitest-reports + path: packages/ckeditor5/.vitest/blob # Re-runs no tests; it replays the blobs to produce the junit and lcov # output and to evaluate the package's real coverage thresholds over the diff --git a/vitest.config.ts b/vitest.config.ts index b3917098d1..690ac2cb4c 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,6 +5,10 @@ export default defineConfig({ projects: [ "packages/*/vitest.config.ts", "packages/*/vite.config.ts", + // ckeditor5 is the one package with both, and its vite.config.ts only builds the library — + // the tests live in vitest.config.ts. Registering both gives two projects called + // "@triliumnext/ckeditor5", which vitest rejects. + "!packages/ckeditor5/vite.config.ts", "apps/*/vitest.config.ts", "apps/*/vite.config.ts", "apps/*/vite.config.mts",