fix(repo): cache nightly node_modules per run to avoid stale graph (#16216)

This commit is contained in:
Miroslav Jonaš 2023-04-11 12:15:50 +02:00 committed by GitHub
parent 149ad5ab17
commit 98501aa56b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View File

@ -50,7 +50,7 @@ jobs:
with:
lookup-only: true
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
@ -350,7 +350,7 @@ jobs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
@ -412,9 +412,7 @@ jobs:
- name: Run e2e tests
id: e2e-run
run: |
yarn nx run-many --target=e2e --projects="${{ join(matrix.project) }}" --parallel=1
yarn nx run-many --target=e2e-macos --projects="${{ join(matrix.project) }}" --parallel=1
run: yarn nx run-many -t e2e,e2e-macos -p ${{ matrix.project }}
timeout-minutes: ${{ matrix.os_timeout }}
env:
GIT_AUTHOR_EMAIL: test@test.com

View File

@ -40,7 +40,7 @@ jobs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: windows-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
@ -268,7 +268,7 @@ jobs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}
- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
@ -280,7 +280,7 @@ jobs:
with:
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
@ -292,7 +292,7 @@ jobs:
- name: Run e2e tests
id: e2e-run
run: yarn nx run-many --target=e2e --projects="${{ join(matrix.project) }}" --parallel=1
run: yarn nx run ${{ matrix.project }}:e2e
timeout-minutes: 120
env:
GIT_AUTHOR_EMAIL: test@test.com