From eaa55df1610d9b5e7600c331bfd9a1aaf2686436 Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:23:39 +0530 Subject: [PATCH] ci(x): parent test harness + GitHub Actions workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit apps/x gains npm test — builds @x/shared first (the core and renderer suites import its dist), then runs the shared, core, and renderer vitest suites in dependency order; per-suite test:shared/test:core/ test:renderer scripts for targeted runs. .github/workflows/x-tests.yml runs that harness on every pull request touching apps/x (plus pushes to main and manual dispatch): pnpm 10 / Node 22, frozen lockfile, pnpm store cached against apps/x's lockfile. Co-Authored-By: Claude Fable 5 --- .github/workflows/x-tests.yml | 40 +++++++++++++++++++++++++++++++++++ apps/x/package.json | 8 +++++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/x-tests.yml diff --git a/.github/workflows/x-tests.yml b/.github/workflows/x-tests.yml new file mode 100644 index 00000000..f657d478 --- /dev/null +++ b/.github/workflows/x-tests.yml @@ -0,0 +1,40 @@ +name: apps/x tests + +on: + pull_request: + paths: + - "apps/x/**" + - ".github/workflows/x-tests.yml" + push: + branches: [main] + paths: + - "apps/x/**" + - ".github/workflows/x-tests.yml" + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/x + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: apps/x/pnpm-lock.yaml + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + # Builds @x/shared (core/renderer tests import its dist), then runs + # the shared, core, and renderer vitest suites in order. + - name: Run tests + run: npm test diff --git a/apps/x/package.json b/apps/x/package.json index 5d875653..d0931dc7 100644 --- a/apps/x/package.json +++ b/apps/x/package.json @@ -12,7 +12,11 @@ "deps": "npm run shared && npm run core && npm run preload", "main": "wait-on http://localhost:5173 && cd apps/main && npm run build && npm run start", "lint": "eslint .", - "lint:fix": "eslint . --fix" + "lint:fix": "eslint . --fix", + "test": "npm run shared && npm run test:shared && npm run test:core && npm run test:renderer", + "test:shared": "cd packages/shared && npm test", + "test:core": "cd packages/core && npm test", + "test:renderer": "cd apps/renderer && npm test" }, "devDependencies": { "@eslint/js": "^9.39.2", @@ -26,4 +30,4 @@ "typescript-eslint": "^8.50.1", "wait-on": "^9.0.3" } -} \ No newline at end of file +}