diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 81cb0c4c37..4d29f30f65 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,11 +1,6 @@ name: 'Setup' description: 'Initialize cache, env var load' inputs: - enable-node-modules-cache: - description: 'enable caching for node modules' - required: false - type: boolean - default: 'true' cache-suffix: description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)' required: false @@ -24,9 +19,6 @@ outputs: npm-tag: description: 'NPM tag' value: ${{ steps.set-npm-tag.outputs.npm-tag }} - node-modules-cache-hit: - description: 'Whether node_modules cache was hit' - value: ${{ steps.node-modules-cache.outputs.cache-hit }} runs: using: "composite" steps: @@ -48,19 +40,9 @@ runs: if: ${{ inputs.full-setup == 'true' }} id: set-npm-tag uses: ./.github/actions/set-npm-tag - - name: Get pnpm store directory - id: pnpm-cache + - name: Install dependencies shell: bash - run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT - - name: Cache pnpm store - id: node-modules-cache - if: ${{ inputs.enable-node-modules-cache == 'true' }} - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + run: pnpm install --frozen-lockfile - name: Restore nx cache uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: diff --git a/.github/workflows/build-lib-workflow.yml b/.github/workflows/build-lib-workflow.yml index 7677d369c6..5d7a8bd0d8 100644 --- a/.github/workflows/build-lib-workflow.yml +++ b/.github/workflows/build-lib-workflow.yml @@ -28,9 +28,6 @@ jobs: with: cache-suffix: build full-setup: 'false' - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Build affected libs env: BASE_REF: ${{ inputs.base_ref }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index bb5b2f8cd0..cb15375348 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -180,9 +180,6 @@ jobs: uses: ./.github/actions/setup with: cache-suffix: setup - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Bundle run: | pnpm run bundle:js-api @@ -209,9 +206,6 @@ jobs: with: cache-suffix: lint full-setup: 'false' - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Run lint env: BASE_REF: ${{ github.base_ref || 'develop' }} @@ -245,9 +239,6 @@ jobs: with: cache-suffix: storybook full-setup: 'false' - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Build Storybook env: BASE_REF: ${{ github.base_ref || 'develop' }} diff --git a/.github/workflows/unit-test-workflow.yml b/.github/workflows/unit-test-workflow.yml index 8c313446e1..07d8933eac 100644 --- a/.github/workflows/unit-test-workflow.yml +++ b/.github/workflows/unit-test-workflow.yml @@ -26,9 +26,6 @@ jobs: uses: ./.github/actions/setup with: cache-suffix: test-matrix - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Generate affected projects matrix id: set-matrix env: @@ -72,9 +69,6 @@ jobs: with: cache-suffix: test-${{ matrix.project }} full-setup: 'false' - - name: Install dependencies - if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} - run: pnpm install --frozen-lockfile - name: Run unit tests for ${{ matrix.project }} env: NODE_OPTIONS: "--max-old-space-size=5120"