mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
ci(circleci): use CircleCI 2.1 syntax improvements (#1496)
* ci(circleci): create common commands * ci(circleci): migrate executors from aliases * ci(circleci): move default_executor from aliases to executors
This commit is contained in:
parent
147137c3ce
commit
214f4645f8
@ -1,28 +1,26 @@
|
|||||||
version: 2
|
version: 2.1
|
||||||
|
|
||||||
|
executors:
|
||||||
|
node_latest_browser:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:latest-browsers
|
||||||
|
node_latest:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:latest
|
||||||
|
node_lts:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:lts
|
||||||
|
default_executor: node_latest
|
||||||
|
|
||||||
aliases:
|
aliases:
|
||||||
- &repo_path
|
- &repo_path
|
||||||
~/verdaccio
|
~/verdaccio
|
||||||
- &defaults
|
- &defaults
|
||||||
working_directory: *repo_path
|
working_directory: *repo_path
|
||||||
- &node_latest_browser_executor
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:latest-browsers
|
|
||||||
- &node_latest_executor
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:latest
|
|
||||||
- &node_lts_executor
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:lts
|
|
||||||
- &default_executor
|
|
||||||
<<: *node_latest_executor
|
|
||||||
- &yarn_cache_key
|
- &yarn_cache_key
|
||||||
yarn-sha-{{ checksum "yarn.lock" }}
|
yarn-sha-{{ checksum "yarn.lock" }}
|
||||||
- &coverage_key
|
- &coverage_key
|
||||||
coverage-{{ .Branch }}-{{ .Revision }}
|
coverage-{{ .Branch }}-{{ .Revision }}
|
||||||
- &restore_repo
|
|
||||||
attach_workspace:
|
|
||||||
at: *repo_path
|
|
||||||
- &ignore_non_dev_branches
|
- &ignore_non_dev_branches
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
@ -33,10 +31,26 @@ aliases:
|
|||||||
- l10n_master
|
- l10n_master
|
||||||
- /release\/.*/
|
- /release\/.*/
|
||||||
|
|
||||||
|
commands:
|
||||||
|
restore_repo:
|
||||||
|
description: Restore repository from workspace
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: *repo_path
|
||||||
|
run_test:
|
||||||
|
description: Run test and functional test
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Test
|
||||||
|
command: yarn run test
|
||||||
|
- run:
|
||||||
|
name: Functional test
|
||||||
|
command: yarn test:functional
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
<<: *default_executor
|
executor: default_executor
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
@ -63,15 +77,10 @@ jobs:
|
|||||||
|
|
||||||
test_node_latest:
|
test_node_latest:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
<<: *node_latest_executor
|
executor: node_latest
|
||||||
steps:
|
steps:
|
||||||
- *restore_repo
|
- restore_repo
|
||||||
- run:
|
- run_test
|
||||||
name: Test with Node Latest
|
|
||||||
command: yarn run test
|
|
||||||
- run:
|
|
||||||
name: Functional test with Node Latest
|
|
||||||
command: yarn test:functional
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: *coverage_key
|
key: *coverage_key
|
||||||
paths:
|
paths:
|
||||||
@ -79,30 +88,25 @@ jobs:
|
|||||||
|
|
||||||
test_node_lts:
|
test_node_lts:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
<<: *node_lts_executor
|
executor: node_lts
|
||||||
steps:
|
steps:
|
||||||
- *restore_repo
|
- restore_repo
|
||||||
- run:
|
- run_test
|
||||||
name: Test with Node LTS
|
|
||||||
command: yarn run test
|
|
||||||
- run:
|
|
||||||
name: Functional test with Node LTS
|
|
||||||
command: yarn test:functional
|
|
||||||
|
|
||||||
test_e2e:
|
test_e2e:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
<<: *node_latest_browser_executor
|
executor: node_latest_browser
|
||||||
steps:
|
steps:
|
||||||
- *restore_repo
|
- restore_repo
|
||||||
- run:
|
- run:
|
||||||
name: Test End-to-End
|
name: Test End-to-End
|
||||||
command: yarn run test:e2e
|
command: yarn run test:e2e
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
<<: *default_executor
|
executor: default_executor
|
||||||
steps:
|
steps:
|
||||||
- *restore_repo
|
- restore_repo
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: *coverage_key
|
key: *coverage_key
|
||||||
- run:
|
- run:
|
||||||
|
Loading…
Reference in New Issue
Block a user