From f2c40ab21a71984abbf86ee087018e969b518192 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 21 Dec 2025 02:25:01 +0100 Subject: [PATCH] feat: Add package testing scripts and update CI workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes: - Introduced new npm scripts for testing all packages and running tests across the server. - Updated GitHub Actions workflow to include a step for running package tests. Benefits: ✅ Enhanced testing capabilities for individual packages ✅ Improved CI process with comprehensive test coverage All tests passing. --- .github/workflows/test.yml | 5 +++++ apps/ui/scripts/prepare-server.mjs | 1 + package.json | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d15b425..84cc4941 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,11 @@ jobs: check-lockfile: "true" rebuild-node-pty-path: "apps/server" + - name: Run package tests + run: npm run test:packages + env: + NODE_ENV: test + - name: Run server tests with coverage run: npm run test:server:coverage env: diff --git a/apps/ui/scripts/prepare-server.mjs b/apps/ui/scripts/prepare-server.mjs index 4b7e6d40..6b9c04ef 100644 --- a/apps/ui/scripts/prepare-server.mjs +++ b/apps/ui/scripts/prepare-server.mjs @@ -23,6 +23,7 @@ const BUNDLE_DIR = join(APP_DIR, 'server-bundle'); const LOCAL_PACKAGES = [ '@automaker/types', '@automaker/utils', + '@automaker/prompts', '@automaker/platform', '@automaker/model-resolver', '@automaker/dependency-resolver', diff --git a/package.json b/package.json index 87ec63a6..9ca58744 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,8 @@ "test:headed": "npm run test:headed --workspace=apps/ui", "test:server": "npm run test --workspace=apps/server", "test:server:coverage": "npm run test:cov --workspace=apps/server", + "test:packages": "npm run test -w @automaker/types -w @automaker/utils -w @automaker/prompts -w @automaker/platform -w @automaker/model-resolver -w @automaker/dependency-resolver -w @automaker/git-utils --if-present", + "test:all": "npm run test:packages && npm run test:server", "lint:lockfile": "! grep -q 'git+ssh://' package-lock.json || (echo 'Error: package-lock.json contains git+ssh:// URLs. Run: git config --global url.\"https://github.com/\".insteadOf \"git@github.com:\"' && exit 1)" }, "dependencies": {