Nightly Health Check #43
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: Nightly Health Check | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # Every night at 2am UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| health-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify build | |
| run: npm run build | |
| - name: Check bundle size | |
| run: | | |
| echo "## 📦 Bundle Size Report" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| File | Size |" >> $GITHUB_STEP_SUMMARY | |
| echo "|------|------|" >> $GITHUB_STEP_SUMMARY | |
| for file in dist/assets/*.js; do | |
| size=$(ls -lh "$file" | awk '{print $5}') | |
| name=$(basename "$file") | |
| echo "| $name | $size |" >> $GITHUB_STEP_SUMMARY | |
| done | |
| - name: Repository stats | |
| run: | | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "## 📊 Repository Stats" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Total files:** $(find src -type f | wc -l)" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Components:** $(find src/components -name '*.jsx' | wc -l)" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Last commit:** $(git log -1 --format='%h - %s')" >> $GITHUB_STEP_SUMMARY |