ci: add yarn cache for material-unit tests job (#29378)

PR Close #29378
This commit is contained in:
Paul Gschwendtner
2019-03-18 19:25:19 +01:00
committed by Matias Niemelä
parent 067657c1e9
commit 37cc514f0f
4 changed files with 45 additions and 17 deletions

View File

@ -563,7 +563,24 @@ jobs:
steps:
- *attach_workspace
- *init_environment
- run: ./scripts/ci/run_angular_material_unit_tests.sh
- run:
name: "Determining SHA of Material Ivy branch"
command: git ls-remote ${MATERIAL_REPO_URL} ${MATERIAL_REPO_BRANCH} | cut -f1 > material_repo_sha
- run:
name: "Cloning Material repository"
command: ./scripts/ci/clone_angular_material_repo.sh
- restore_cache:
keys:
- v1-angular-material-{{ checksum "material_repo_sha" }}
- v1-angular-material-
- run:
name: "Running Material unit tests"
command: ./scripts/ci/run_angular_material_unit_tests.sh
- save_cache:
key: v1-angular-material-{{ checksum "material_repo_sha" }}
paths:
# Needs to be hardcoded because environment variables are not interpolated here.
- "/tmp/material2/node_modules"
workflows:
version: 2

View File

@ -62,6 +62,15 @@ setPublicVar SAUCE_TUNNEL_IDENTIFIER "angular-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_
# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.
setPublicVar SAUCE_READY_FILE_TIMEOUT 120
####################################################################################################
# Define environment variables for the Angular Material unit tests job.
####################################################################################################
# We specifically use a directory within "/tmp" here because we want the cloned repo to be
# completely isolated from angular/angular in order to avoid any bad interactions between
# their separate build setups.
setPublicVar MATERIAL_REPO_TMP_DIR "/tmp/material2"
setPublicVar MATERIAL_REPO_URL "https://github.com/angular/material2.git"
setPublicVar MATERIAL_REPO_BRANCH "ivy-2019"
# Source `$BASH_ENV` to make the variables available immediately.
source $BASH_ENV;