Skip to content

chore(deps-dev): bump @vitest/ui from 3.2.4 to 4.0.4 #203

chore(deps-dev): bump @vitest/ui from 3.2.4 to 4.0.4

chore(deps-dev): bump @vitest/ui from 3.2.4 to 4.0.4 #203

name: Create-Typink Template Tests
on:
push:
branches: [ main ]
workflow_dispatch:
merge_group:
pull_request:
env:
TYPINK_TEMPLATE_BRANCH: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install repo deps
run: yarn install --immutable
- name: Build create-typink CLI
run: yarn workspace create-typink build
- name: CLI smoke tests
run: |
node packages/create-typink/dist/index.js --help
# Invalid template should be rejected
if node packages/create-typink/dist/index.js --name "test" --template "invalid-template" -N "Passet Hub" 2>&1 | grep -q "is not available"; then
echo "✅ CLI correctly rejects invalid template"
else
echo "❌ CLI should reject invalid template"
exit 1
fi
# Invalid project name should be rejected
if node packages/create-typink/dist/index.js --name "Invalid Name With Spaces" --template "legacy-nextjs" -N "Aleph Zero Testnet" 2>&1 | grep -q "not a valid package name"; then
echo "✅ CLI correctly rejects invalid project name"
else
echo "❌ CLI should reject invalid project name"
exit 1
fi
- name: Test all templates (Node 20 + Bun)
shell: bash
run: |
set -euo pipefail
TEMPLATES=(
inkv6-nextjs
inkv6-sol-nextjs
sol-nextjs
inkv5-nextjs
)
for T in "${TEMPLATES[@]}"; do
WORKDIR="/tmp/typink-test-${T}-20"
APPDIR="${WORKDIR}/test-app-${T}"
# Pick one network based on template family
NETWORK="Passet Hub"
if [[ "$T" == inkv5-* ]]; then
NETWORK="Pop Testnet"
fi
echo "=== Creating ${T} (Node 20 + Bun) ==="
rm -rf "$WORKDIR"
mkdir -p "$WORKDIR"
cd "$WORKDIR"
node ${{ github.workspace }}/packages/create-typink/dist/index.js \
--name "test-app-${T}" \
--template "${T}" \
-N "$NETWORK" \
--skip-install \
--no-git
cd "$APPDIR"
# Install deps with Bun
bun install --no-progress
# Lint with Bun (runs package.json "lint" script)
bun run lint
# Build with Bun (runs package.json "build" script)
bun run build
# Verify build artifacts
if [[ "$T" == *"nextjs"* ]]; then
if [ ! -d ".next" ]; then
echo "❌ Next.js build failed for ${T} - .next directory not found"
exit 1
fi
echo "✅ Next.js build successful for ${T}"
else
if [ ! -d "dist" ]; then
echo "❌ Vite build failed for ${T} - dist directory not found"
exit 1
fi
echo "✅ Vite build successful for ${T}"
fi
# TypeScript check if tsconfig exists
if [ -f "tsconfig.json" ]; then
bun x tsc --noEmit
echo "✅ TypeScript compilation successful for ${T}"
fi
# Clean up
rm -rf "$WORKDIR"
done