Skip to content

chore(deps): update commitlint monorepo to v20.4.1 #71

chore(deps): update commitlint monorepo to v20.4.1

chore(deps): update commitlint monorepo to v20.4.1 #71

Workflow file for this run

name: Integration Test
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
name: Test (${{ matrix.pkg-manager }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pkg-manager: [npm, yarn, pnpm, bun, deno]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
- name: Setup pnpm
if: matrix.pkg-manager == 'pnpm'
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10
- name: Setup Bun
if: matrix.pkg-manager == 'bun'
uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2
- name: Setup Deno
if: matrix.pkg-manager == 'deno'
uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
- name: Run Integration Test
shell: bash
run: |
PROJECT_NAME="test-app-${{ matrix.pkg-manager }}"
export CREATE_HARPER_SKIP_UPDATE=true
echo "Testing with ${{ matrix.pkg-manager }}..."
case ${{ matrix.pkg-manager }} in
npm)
npx . "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install
;;
yarn)
corepack enable
yarn node index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install
;;
pnpm)
pnpm exec node index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install
;;
bun)
bun run index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install
;;
deno)
# Deno doesn't set npm_config_user_agent, so we set it manually
export npm_config_user_agent="deno/1.40.0"
deno run -A index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install
;;
esac
# Verification
if [ ! -d "$PROJECT_NAME" ]; then
echo "Error: Project directory $PROJECT_NAME was not created"
exit 1
fi
if [ ! -f "$PROJECT_NAME/package.json" ]; then
echo "Error: package.json was not created in $PROJECT_NAME"
exit 1
fi
# Output check
case ${{ matrix.pkg-manager }} in
npm)
OUTPUT=$(npx . "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install)
echo "$OUTPUT" | grep -F "npm install" || (echo "Expected 'npm install' in output"; exit 1)
;;
yarn)
OUTPUT=$(yarn node index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install)
echo "$OUTPUT" | grep -F "yarn" || (echo "Expected 'yarn' in output"; exit 1)
;;
pnpm)
OUTPUT=$(pnpm exec node index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install)
echo "$OUTPUT" | grep -F "pnpm install" || (echo "Expected 'pnpm install' in output"; exit 1)
;;
bun)
OUTPUT=$(bun run index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install)
echo "$OUTPUT" | grep -F "bun install" || (echo "Expected 'bun install' in output"; exit 1)
;;
deno)
export npm_config_user_agent="deno/1.40.0"
OUTPUT=$(deno run -A index.js "$PROJECT_NAME" --template vanilla --no-interactive --overwrite --skip-install)
echo "$OUTPUT" | grep -F "deno task dev" || (echo "Expected 'deno task dev' in output"; exit 1)
;;
esac
echo "Integration test passed for ${{ matrix.pkg-manager }}!"