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

View File

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