Skip to content

⬆️(deps): bump gitleaks/gitleaks-action from 2 to 3 #182

⬆️(deps): bump gitleaks/gitleaks-action from 2 to 3

⬆️(deps): bump gitleaks/gitleaks-action from 2 to 3 #182

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
# Also run on pushes to main/develop to verify merged code
# Cancel in-progress runs for same workflow and ref
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_ENV: test
jobs:
# Job 1: Code Quality Checks (fast checks first)
quality:
name: Code Quality
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
# - name: Setup Node.js
# uses: actions/setup-node@v6
# with:
# node-version: 24.12.0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.4
- name: Cache dependencies
uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
# Note: Panda CSS generation now runs automatically via prepare script
- name: Cache styled-system
uses: actions/cache@v5
with:
path: styled-system
key: ${{ runner.os }}-panda-${{ hashFiles('panda.config.ts', 'src/theme/**/*.ts', 'src/**/*.{ts,tsx,astro}') }}
# Run quality checks with Biome (replaces format + lint)
- name: Run Biome Quality Checks
run: |
# Run Biome checks in parallel using background processes
bunx biome ci --formatter-enabled=true --linter-enabled=true & BIOME_PID=$!
bun run check:circular-deps & CIRCULAR_PID=$!
# Wait for all processes and collect exit codes
wait $BIOME_PID; BIOME_EXIT=$?
wait $CIRCULAR_PID; CIRCULAR_EXIT=$?
# Check if any failed
if [ $BIOME_EXIT -ne 0 ]; then
echo "❌ Biome quality checks failed (format/lint)"
exit 1
fi
if [ $CIRCULAR_EXIT -ne 0 ]; then
echo "❌ Circular dependencies detected"
exit 1
fi
echo "✅ All quality checks passed"
# Job 2: Type Checking (can run in parallel with quality)
typecheck:
name: Type Check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
# - name: Setup Node.js
# uses: actions/setup-node@v6
# with:
# node-version: 24.12.0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.4
- name: Restore dependencies cache
uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
# Note: Panda CSS generation now runs automatically via prepare script
- name: Restore Panda cache
uses: actions/cache@v5
with:
path: styled-system
key: ${{ runner.os }}-panda-${{ hashFiles('panda.config.ts', 'src/theme/**/*.ts', 'src/**/*.{ts,tsx,astro}') }}
- name: Type Check
run: bun run check:types
# Job 3: Build (depends on quality and typecheck)
build:
name: Build
runs-on: ubuntu-latest
needs: [quality, typecheck]
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
# - name: Setup Node.js
# uses: actions/setup-node@v6
# with:
# node-version: 24.12.0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.4
- name: Restore dependencies cache
uses: actions/cache@v5
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
# Note: Panda CSS generation now runs automatically via prepare script
- name: Restore Panda cache
uses: actions/cache@v5
with:
path: styled-system
key: ${{ runner.os }}-panda-${{ hashFiles('panda.config.ts', 'src/theme/**/*.ts', 'src/**/*.{ts,tsx,astro}') }}
- name: Build
run: bun run build
- name: Cache build artifacts
uses: actions/cache@v5
with:
path: dist
key: ${{ runner.os }}-build-${{ github.sha }}
# Upload build artifacts for inspection
- name: Upload build artifacts
uses: actions/upload-artifact@v5
if: always()
with:
name: build-artifacts
path: |
dist/
.astro/
retention-days: 7
# Job 4: Bundle Analysis (optional, runs after build)
analyze:
name: Bundle Analysis
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'pull_request'
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Restore build cache
uses: actions/cache@v5
with:
path: dist
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Analyze bundle size
run: |
echo "## 📦 Bundle Analysis" >> $GITHUB_STEP_SUMMARY
echo "| File | Size |" >> $GITHUB_STEP_SUMMARY
echo "|------|------|" >> $GITHUB_STEP_SUMMARY
if [ -d "dist" ]; then
find dist -name "*.js" -o -name "*.css" | while read file; do
size=$(du -h "$file" | cut -f1)
echo "| $file | $size |" >> $GITHUB_STEP_SUMMARY
done
else
echo "| No build artifacts found | - |" >> $GITHUB_STEP_SUMMARY
fi
# Summary job for required status checks
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [quality, typecheck, build]
if: always()
steps:
- name: Check CI Results
run: |
if [ "${{ needs.quality.result }}" != "success" ] || [ "${{ needs.typecheck.result }}" != "success" ] || [ "${{ needs.build.result }}" != "success" ]; then
echo "❌ CI failed"
exit 1
fi
echo "✅ All CI checks passed"