PaaS/CI CD

Github Actions) 성능제고를 위한 방안 cache

armyost 2024. 2. 20. 23:06
728x90

 

의존성 다운로드가 있을때는 Cache가 상당히 효과가 있다.

https://github.com/actions/cache

 

GitHub - actions/cache: Cache dependencies and build outputs in GitHub Actions

Cache dependencies and build outputs in GitHub Actions - actions/cache

github.com

 

      - name: Load cached node_modules
        uses: actions/cache@v3
        with:
          path: node_modules
          key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package.json') }}

 

이러한 프로세스 후에 npm install 이나 yarn install 하면 상당히 성능이 향상된다.

 

본 Step이 없을때 40초 이상

 

본 Step이 있을때 현저히 빨라진다.