name: Node set up composite description: Will set up Node and install all packages by caching node_modules runs: using: 'composite' steps: - name: Cache node_modules uses: actions/cache@v4 id: cache-node_modules env: # Default is 10 min, per segment, but we can make it much smaller # because it's not the end of the world if the cache restore fails. SEGMENT_DOWNLOAD_TIMEOUT_MINS: '1' with: path: node_modules key: ${{ runner.os }}-node_modules-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/actions/node-npm-setup/action.yml') }} - name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: node-version-file: 'package.json' cache: npm - name: Install dependencies if: ${{ steps.cache-node_modules.outputs.cache-hit != 'true' }} shell: bash run: npm ci