From ee38ffa781f3937b9fc8433307260e8c87f401d5 Mon Sep 17 00:00:00 2001 From: Roger Chappel Date: Thu, 11 Jun 2026 21:52:21 +1000 Subject: [PATCH 1/2] ci: run package verification in workflow --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9736a97..239f74e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,25 +48,48 @@ jobs: exit 1 fi - - name: Run optional Node checks + - name: Run package verification run: | set -euo pipefail if [ ! -f package.json ]; then echo "No package.json found; skipping Node checks." - echo "TODO: add install, lint, test, typecheck, or build commands when this template becomes an app or package." exit 0 fi - if [ -f package-lock.json ]; then + if [ -f pnpm-lock.yaml ]; then + corepack enable + pnpm install --frozen-lockfile + if pnpm run | grep -q " release:check"; then + pnpm run release:check + else + pnpm run check --if-present + pnpm test --if-present + pnpm run build --if-present + pnpm run smoke --if-present + pnpm run package:smoke --if-present + fi + elif [ -f package-lock.json ]; then npm ci + if npm run | grep -q " release:check"; then + npm run release:check + else + npm run check --if-present + npm test --if-present + npm run build --if-present + npm run smoke --if-present + npm run package:smoke --if-present + fi else npm install + if npm run | grep -q " release:check"; then + npm run release:check + else + npm run check --if-present + npm test --if-present + npm run build --if-present + npm run smoke --if-present + npm run package:smoke --if-present + fi fi - npm run check --if-present - npm test --if-present - npm run typecheck --if-present - npm run build --if-present - npm run smoke --if-present - bash scripts/validate.sh From 71a59917eaed5ab9998d19eed9b8c1072726caa3 Mon Sep 17 00:00:00 2001 From: Roger Chappel Date: Thu, 11 Jun 2026 21:54:02 +1000 Subject: [PATCH 2/2] ci: check package scripts without npm run probing --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 239f74e..92ebea6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: if [ -f pnpm-lock.yaml ]; then corepack enable pnpm install --frozen-lockfile - if pnpm run | grep -q " release:check"; then + if node -e "process.exit(require('./package.json').scripts?.['release:check'] ? 0 : 1)"; then pnpm run release:check else pnpm run check --if-present @@ -71,7 +71,7 @@ jobs: fi elif [ -f package-lock.json ]; then npm ci - if npm run | grep -q " release:check"; then + if node -e "process.exit(require('./package.json').scripts?.['release:check'] ? 0 : 1)"; then npm run release:check else npm run check --if-present @@ -82,7 +82,7 @@ jobs: fi else npm install - if npm run | grep -q " release:check"; then + if node -e "process.exit(require('./package.json').scripts?.['release:check'] ? 0 : 1)"; then npm run release:check else npm run check --if-present