fix: Add mutable properties to props across components to eliminate p… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- '.github/**' | |
- 'docs/**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linting (if available) | |
run: npm run lint --if-present | |
- name: Run tests | |
run: npm test | |
- name: Build project | |
run: npm run build | |
- name: Check TypeScript types | |
run: npx tsc --noEmit --skipLibCheck | |
build-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Check build output | |
run: | | |
if [ ! -d "dist" ]; then | |
echo "❌ Build failed: dist directory not found" | |
exit 1 | |
fi | |
if [ ! -f "dist/index.js" ]; then | |
echo "❌ Build failed: main entry point not found" | |
exit 1 | |
fi | |
echo "✅ Build successful: all required files generated" | |
ls -la dist/ | |
size-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Check bundle size | |
run: | | |
echo "📦 Bundle sizes:" | |
du -h dist/* | sort -hr | |
# Check if main bundle is reasonable size (adjust as needed) | |
MAIN_SIZE=$(du -k dist/av-inputs/av-inputs.esm.js | cut -f1) | |
if [ $MAIN_SIZE -gt 2048 ]; then | |
echo "⚠️ Warning: Main bundle is larger than 2MB ($MAIN_SIZE KB)" | |
else | |
echo "✅ Bundle size looks good ($MAIN_SIZE KB)" | |
fi |