Files
AutoGPT/.github
SOUHAILA SERBOUT e2bd727798 feat: optimize frontend CI with shared setup job (#10286)
# Change details
- **Before**: Each job separately installs dependencies (~4 redundant
installations)
  ### Massive Redundancy in Setup Steps
  Each job repeats these SAME 4 steps:
  - Checkout repository
  - Set up Node.js (version 21) 
  - Enable corepack
  - Install dependencies (pnpm install --frozen-lockfile)
  
  This happens 4+ times across different jobs:

   -  lint job
    - type-check job
    - chromatic job
    - test job (runs 2x due to matrix strategy)
    
   ### No Dependency Caching
  No caching strategy - downloads packages fresh every time
   - Every workflow run downloads all packages from scratch
   - No benefit from previous runs, even with identical pnpm-lock.yaml


- **After**: Dependencies installed once in setup job, cached and reused

This optimization maintains all existing CI functionality while
significantly improving pipeline efficiency.
A workflow run example is dispatched:
https://github.com/souhailaS/AutoGPT/actions/workflows/platform-frontend-ci.yml


## Additional Context 
We are a team of researchers from University of Zurich
(https://www.ifi.uzh.ch/en/zest.html) currently **working on automating
energy optimizations in GitHub Actions workflows**. This optimization
maintains full functionality while significantly reducing computational
overhead and energy consumption.

souhaila.serbout@uzh.ch
2025-07-02 10:02:19 +00:00
..