Skip to content

Add build and Lighthouse performance tests for React admin template#2

Closed
devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1767896304-performance-tests
Closed

Add build and Lighthouse performance tests for React admin template#2
devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1767896304-performance-tests

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Jan 8, 2026

Summary

This PR adds performance testing infrastructure for the CoreUI React Admin Template, including:

  • GitHub Actions workflow (performance-tests.yml) that runs on push/PR to main and can be triggered manually
  • Build performance test script (build-perf-test.js) that measures:
    • Build time (threshold: 2 minutes)
    • Total bundle size (threshold: 5MB)
    • Chunk count (threshold: 50 chunks)
    • Largest chunk size (threshold: 2MB)
    • Lint execution time (threshold: 30 seconds)
  • Lighthouse CI configuration (lighthouserc.json) with thresholds for Core Web Vitals and accessibility scores

The workflow uploads test results as artifacts and runs Lighthouse audits against the built static files.

Review & Testing Checklist for Human

  • Verify build output directory: The script assumes ./build as the output directory - confirm this matches Vite's build.outDir configuration in vite.config.mjs
  • Validate thresholds are appropriate: The hardcoded thresholds (2 min build, 5MB bundle, 50 chunks) are estimates - run node tests/performance/build-perf-test.js locally to see actual values and adjust if needed
  • Review Lighthouse continue-on-error: true: This means Lighthouse failures won't block the workflow - confirm this is intentional behavior
  • Test the workflow end-to-end: Trigger the workflow manually via GitHub Actions to verify it completes successfully

Recommended Test Plan

  1. Run npm ci && node tests/performance/build-perf-test.js locally to verify the script works
  2. Check the generated tests/performance/results.json for reasonable values
  3. After merging, trigger the workflow manually and verify both jobs complete

Notes

  • The lint test marks as "passed" even with warnings/errors (only measures time) - this may need adjustment based on team preferences
  • Lighthouse results are uploaded to temporary public storage for viewing

Link to Devin run: https://partner-workshops.devinenterprise.com/sessions/cf94d817dd244336971fd9b8333d75d7

@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration Bot deleted the devin/1767896304-performance-tests branch April 24, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants