chore(repo): add Cypress cache to top-level install job (#15959)

This commit is contained in:
Jack Hsu 2023-03-29 15:00:35 -04:00 committed by GitHub
parent 6221cdae45
commit cd16ec3a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 4 deletions

View File

@ -12,7 +12,7 @@ on:
default: false
env:
CYPRESS_CACHE_FOLDER: '.cypress'
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: {}
jobs:
@ -56,6 +56,18 @@ jobs:
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
lookup-only: true
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
e2e:
needs: preinstall
permissions:
@ -354,9 +366,13 @@ jobs:
id: cache-cypress
uses: actions/cache@v3
with:
path: '.cypress'
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
- name: Install applesimutils, reset ios simulators
if: ${{ matrix.os == 'macos-latest' }}
run: |

View File

@ -12,7 +12,7 @@ on:
default: false
env:
CYPRESS_CACHE_FOLDER: '.cypress'
CYPRESS_CACHE_FOLDER: ${{ github.workspace }}/.cypress
permissions: {}
jobs:
@ -46,6 +46,18 @@ jobs:
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v3
with:
lookup-only: true
path: '${{ github.workspace }}/.cypress'
key: windows-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
e2e:
needs: preinstall
permissions:
@ -266,9 +278,13 @@ jobs:
id: cache-cypress
uses: actions/cache@v3
with:
path: '.cypress'
path: '${{ github.workspace }}/.cypress'
key: ${{ runner.os }}-cypress
- name: Install Cypress
if: steps.cache-cypress.outputs.cache-hit != 'true'
run: npx cypress install
- name: Configure git metadata (needed for lerna smoke tests)
run: |
git config --global user.email test@test.com