mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 02:24:10 +08:00
ci: use workspace persistence
This commit is contained in:
parent
af6dc938bd
commit
3000c8a935
@ -8,40 +8,44 @@ _defaults: &defaults
|
||||
_post_checkout: &post_checkout
|
||||
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
|
||||
|
||||
_root_package_lock_key: &_root_package_lock_key
|
||||
key: angular_devkit-{{ checksum "yarn.lock" }}-0.3.3
|
||||
_root_package_lock_key: &root_package_lock_key
|
||||
key: angular_devkit-{{ checksum "yarn.lock" }}-0.3.3-2
|
||||
|
||||
_attach_options: &attach_options
|
||||
at: .
|
||||
|
||||
jobs:
|
||||
install:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- restore_cache: *root_package_lock_key
|
||||
- run: yarn install --frozen-lockfile
|
||||
- save_cache:
|
||||
<<: *_root_package_lock_key
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- "node_modules"
|
||||
- ./*
|
||||
- save_cache:
|
||||
<<: *root_package_lock_key
|
||||
paths:
|
||||
- ~/.cache/yarn
|
||||
|
||||
lint:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm run lint
|
||||
|
||||
validate:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm run validate -- --ci
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm run test -- --code-coverage --full
|
||||
|
||||
test-large:
|
||||
@ -49,8 +53,7 @@ jobs:
|
||||
resource_class: large
|
||||
parallelism: 4
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm run webdriver-update-circleci
|
||||
- run: npm run test-large -- --code-coverage --full --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
|
||||
|
||||
@ -61,31 +64,28 @@ jobs:
|
||||
resource_class: xlarge
|
||||
parallelism: 4
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm install --global npm@6.1
|
||||
- run: xvfb-run -a node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
|
||||
|
||||
build:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run: npm run admin -- build
|
||||
|
||||
build-bazel:
|
||||
<<: *defaults
|
||||
resource_class: large
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- attach_workspace: *attach_options
|
||||
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||
- run: bazel build //packages/...
|
||||
|
||||
snapshot_publish:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run:
|
||||
name: Decrypt Credentials
|
||||
command: |
|
||||
@ -98,8 +98,7 @@ jobs:
|
||||
publish:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout: *post_checkout
|
||||
- restore_cache: *_root_package_lock_key
|
||||
- attach_workspace: *attach_options
|
||||
- run:
|
||||
name: Decrypt Credentials
|
||||
command: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user