diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab7616c5..0ec9cca6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,33 @@ jobs: - name: Verify package contents run: npm pack --workspace=@codeburn/core --dry-run + cli: + name: cli (node ${{ matrix.node }}) + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + node: ['22.13.x', '24.x'] + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + + - name: Check workspace versions + run: npm run check:workspace-versions + + - name: Install from lockfile + run: npm ci + + - name: Build core + run: npm run build --workspace=@codeburn/core + + - name: Test cli + run: npm test --workspace=codeburn + semgrep: runs-on: ubuntu-latest steps: diff --git a/package.json b/package.json index 8a8ebd7e..738923e8 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build:cli": "npm run build:cli -w codeburn", "build:dash": "npm run build:dash -w codeburn", "dev": "npm run dev -w codeburn", - "test": "npm run test -w codeburn", + "test": "npm run build -w @codeburn/core && npm run test -w @codeburn/core && npm run test -w codeburn", "check:workspace-versions": "node scripts/check-workspace-versions.mjs" }, "engines": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 1f79d864..eb71b80b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -16,7 +16,7 @@ "build:cli": "tsup && node -e \"const fs=require('fs'); fs.copyFileSync('src/cli.ts','dist/cli.js'); fs.chmodSync('dist/cli.js',0o755)\"", "build:dash": "cd ../../dash && npm install --no-audit --no-fund --silent && npm run build", "dev": "NODE_OPTIONS=--no-deprecation tsx src/cli.ts", - "test": "vitest", + "test": "vitest run", "prepublishOnly": "npm run build" }, "keywords": [