From 7554ae92eb24ac2b1cab93a16567fa18ea665ed7 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Wed, 27 May 2026 15:12:08 -0400 Subject: [PATCH] fix: run build before lint/test in CI so typechecking doesn't fail on unbuilt generated files --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 9 ++++++--- vite.config.ts | 22 ++++++++++++++-------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7251bb..5fbd837 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,15 +22,15 @@ jobs: node-version: 24 cache: true + - name: Build + run: vp run build + - name: Lint run: vp check - name: Tests run: vp test - - name: Build - run: vp run build - - name: Smoke-test built CLI run: | node apps/cli/dist/bin.mjs --version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 321a66d..43aa205 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,15 +29,18 @@ jobs: node-version: 24 cache: true + # TODO: we need to build the entire repo here just so that typechecking + # passes in the next step; otherwise, the web app is missing the built + # content-collections files and hard-fails on apps/web/src/lib/source.ts. + - name: Build + run: vp run build + - name: Lint run: vp check - name: Tests run: vp test - - name: Build - run: vp run build:cli - - name: Create release PR or publish id: changesets uses: changesets/action@v1 diff --git a/vite.config.ts b/vite.config.ts index b01694b..de7fc59 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,12 +1,18 @@ import { defineConfig } from "vite-plus"; export default defineConfig({ - test: { - projects: ["apps/*", "packages/*"], + run: { + cache: { + scripts: true, + tasks: true, + }, }, staged: { "*": "vp check --fix", }, + test: { + projects: ["apps/*", "packages/*"], + }, fmt: { sortImports: {}, sortTailwindcss: { @@ -31,6 +37,12 @@ export default defineConfig({ }, lint: { plugins: ["oxc", "eslint", "typescript", "unicorn", "import", "promise", "vitest"], + jsPlugins: [ + { + name: "vite-plus", + specifier: "vite-plus/oxlint-plugin", + }, + ], categories: { correctness: "error", suspicious: "warn", @@ -96,11 +108,5 @@ export default defineConfig({ typeAware: true, typeCheck: true, }, - jsPlugins: [ - { - name: "vite-plus", - specifier: "vite-plus/oxlint-plugin", - }, - ], }, });