feat: Add package testing scripts and update CI workflow

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.
This commit is contained in:
Kacper
2025-12-21 02:25:01 +01:00
parent 0ce6b6d4b1
commit f2c40ab21a
3 changed files with 8 additions and 0 deletions

View File

@@ -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:

View File

@@ -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',

View File

@@ -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": {