diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ff65d3a..1385fa35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,25 @@ jobs: - run: pnpm exec vp build - run: pnpm desktop:bundle + # Release builds run the tests on macOS and Windows too, so catch platform-only failures here first. + test: + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - uses: pnpm/action-setup@v6 + with: + version: 12.14.0 + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm test + # The Docker image has its own dependency set (--prod) and file layout, which `check` never exercises. docker: runs-on: ubuntu-latest diff --git a/src/lib/theme/chart-palette.test.ts b/src/lib/theme/chart-palette.test.ts index 64d4f986..c477f7c3 100644 --- a/src/lib/theme/chart-palette.test.ts +++ b/src/lib/theme/chart-palette.test.ts @@ -64,7 +64,10 @@ for (const theme of THEMES) { }); test(`${theme} CSS tokens match the config`, () => { - const css = readFileSync(new URL("../../index.css", import.meta.url), "utf8"); + const css = readFileSync(new URL("../../index.css", import.meta.url), "utf8").replace( + /\r\n/g, + "\n", + ); const selector = theme === "dark" ? '[data-theme="dark"] {' : ':root,\n[data-theme="light"] {'; const blocks = css .split(selector)