init
This commit is contained in:
parent
7e7e260600
commit
f58e6166b5
@ -17,7 +17,7 @@ spec:
|
||||
- name: nodejsImageName
|
||||
type: string
|
||||
default: "node:slim"
|
||||
description: Node.js image (e.g., node:23-slim)
|
||||
description: Node.js image (e.g., node:18-slim)
|
||||
|
||||
workspaces:
|
||||
- name: source
|
||||
@ -48,14 +48,24 @@ spec:
|
||||
cd "$(params.subdirectory)"
|
||||
fi
|
||||
|
||||
echo "📦 Installing dependencies"
|
||||
npm ci
|
||||
echo "🧩 Using pnpm via corepack"
|
||||
corepack enable
|
||||
corepack prepare pnpm@8.15.4 --activate
|
||||
|
||||
echo "🔐 Checking for private npm credentials"
|
||||
if [ -f /workspace/npm-auth/.npmrc ]; then
|
||||
echo "✅ Found .npmrc"
|
||||
cp /workspace/npm-auth/.npmrc ~/.npmrc
|
||||
fi
|
||||
|
||||
echo "📦 Installing dependencies with pnpm"
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
echo "🔍 Running ESLint for project: $(params.targetProject)"
|
||||
npx nx lint $(params.targetProject)
|
||||
pnpm nx lint $(params.targetProject)
|
||||
|
||||
echo "🧪 Running Jest tests for project: $(params.targetProject) with coverage"
|
||||
npx nx test $(params.targetProject) --code-coverage
|
||||
pnpm nx test $(params.targetProject) --code-coverage
|
||||
|
||||
COVERAGE_DIR="coverage/$(params.targetProject)"
|
||||
HTML_DIR="$COVERAGE_DIR/lcov-report"
|
||||
|
Loading…
x
Reference in New Issue
Block a user