2018-06-03 08:50:44 -05:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
aliases:
|
|
|
|
- &defaults
|
|
|
|
working_directory: ~/verdaccio
|
|
|
|
- &node8_executor
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:8
|
2019-04-28 17:20:26 -05:00
|
|
|
- &node12_browser_executor
|
2018-06-03 08:50:44 -05:00
|
|
|
docker:
|
2019-04-28 17:20:26 -05:00
|
|
|
- image: circleci/node:12-browsers
|
2018-06-03 08:50:44 -05:00
|
|
|
- &node10_executor
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:10
|
2018-12-07 00:41:37 -05:00
|
|
|
- &node11_executor
|
|
|
|
docker:
|
2019-04-28 17:20:26 -05:00
|
|
|
- image: circleci/node:11
|
|
|
|
- &node12_executor
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:12
|
2018-06-03 08:50:44 -05:00
|
|
|
- &default_executor
|
2019-04-28 17:20:26 -05:00
|
|
|
<<: *node12_executor
|
2018-06-03 08:50:44 -05:00
|
|
|
- &repo_key
|
|
|
|
repo-{{ .Branch }}-{{ .Revision }}
|
2018-06-09 11:19:43 -05:00
|
|
|
- &coverage_key
|
|
|
|
coverage-{{ .Branch }}-{{ .Revision }}
|
2018-06-03 08:50:44 -05:00
|
|
|
- &base_config_key
|
|
|
|
base-config-{{ .Branch }}-{{ .Revision }}
|
|
|
|
- &yarn_cache_key
|
|
|
|
yarn-sha-{{ checksum "yarn.lock" }}
|
|
|
|
- &restore_repo
|
2018-11-17 05:54:20 -05:00
|
|
|
attach_workspace:
|
|
|
|
at: ~/verdaccio
|
2018-06-30 10:30:04 -05:00
|
|
|
- &ignore_non_dev_branches
|
2018-06-03 08:50:44 -05:00
|
|
|
filters:
|
2018-06-12 03:28:55 -05:00
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-06-03 08:50:44 -05:00
|
|
|
branches:
|
|
|
|
ignore:
|
|
|
|
- gh-pages
|
|
|
|
- l10n_master
|
|
|
|
- /release\/.*/
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
prepare:
|
|
|
|
<<: *defaults
|
|
|
|
<<: *default_executor
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: *base_config_key
|
|
|
|
- restore_cache:
|
|
|
|
key: *yarn_cache_key
|
|
|
|
- run:
|
|
|
|
name: Install Js dependencies
|
2018-12-22 06:54:43 -05:00
|
|
|
command: yarn install --no-progress --registry https://registry.verdaccio.org
|
2018-06-03 08:50:44 -05:00
|
|
|
- run:
|
|
|
|
name: Prepare CI
|
|
|
|
command: yarn run pre:ci
|
|
|
|
- run:
|
|
|
|
name: Build project
|
|
|
|
command: yarn run code:build
|
|
|
|
- save_cache:
|
|
|
|
key: *yarn_cache_key
|
|
|
|
paths:
|
|
|
|
- ~/.yarn
|
|
|
|
- ~/.cache/yarn
|
|
|
|
- node_modules
|
2018-11-17 05:54:20 -05:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: ~/verdaccio
|
2018-06-03 08:50:44 -05:00
|
|
|
paths:
|
2018-11-17 05:54:20 -05:00
|
|
|
- ./*
|
2018-06-03 08:50:44 -05:00
|
|
|
|
|
|
|
test_node8:
|
|
|
|
<<: *defaults
|
|
|
|
<<: *node8_executor
|
|
|
|
steps:
|
|
|
|
- *restore_repo
|
|
|
|
- run:
|
|
|
|
name: Test with Node 8
|
2018-07-03 14:39:57 -05:00
|
|
|
command: |
|
|
|
|
yarn test
|
2019-02-24 17:56:02 -05:00
|
|
|
yarn test:functional
|
2018-06-03 08:50:44 -05:00
|
|
|
test_node10:
|
|
|
|
<<: *defaults
|
|
|
|
<<: *node10_executor
|
|
|
|
steps:
|
|
|
|
- *restore_repo
|
|
|
|
- run:
|
|
|
|
name: Test with Node 10
|
2018-07-03 14:39:57 -05:00
|
|
|
command: |
|
|
|
|
yarn run test
|
|
|
|
yarn test:functional
|
2018-06-03 08:50:44 -05:00
|
|
|
|
2018-12-07 00:41:37 -05:00
|
|
|
test_node11:
|
|
|
|
<<: *defaults
|
2018-12-07 02:09:36 -05:00
|
|
|
<<: *node11_executor
|
2018-12-07 00:41:37 -05:00
|
|
|
steps:
|
|
|
|
- *restore_repo
|
|
|
|
- run:
|
|
|
|
name: Test with Node 11
|
|
|
|
command: |
|
|
|
|
yarn run test
|
|
|
|
yarn test:functional
|
|
|
|
|
2019-04-28 17:20:26 -05:00
|
|
|
test_node12:
|
|
|
|
<<: *defaults
|
|
|
|
<<: *node12_executor
|
|
|
|
steps:
|
|
|
|
- *restore_repo
|
|
|
|
- run:
|
|
|
|
name: Test with Node 12
|
|
|
|
command: |
|
|
|
|
yarn run test
|
|
|
|
yarn test:functional
|
|
|
|
|
2018-06-03 08:50:44 -05:00
|
|
|
test_e2e:
|
|
|
|
<<: *defaults
|
2019-04-28 17:20:26 -05:00
|
|
|
<<: *node12_browser_executor
|
2018-06-03 08:50:44 -05:00
|
|
|
steps:
|
|
|
|
- *restore_repo
|
|
|
|
- run:
|
|
|
|
name: Test End-to-End
|
|
|
|
command: yarn run test:e2e
|
|
|
|
coverage:
|
|
|
|
<<: *defaults
|
|
|
|
<<: *default_executor
|
|
|
|
steps:
|
|
|
|
- *restore_repo
|
2018-06-09 11:19:43 -05:00
|
|
|
- restore_cache:
|
|
|
|
key: *coverage_key
|
2018-06-03 08:50:44 -05:00
|
|
|
- run:
|
|
|
|
name: Publish coverage
|
|
|
|
command: yarn run coverage:publish
|
2018-06-09 11:19:43 -05:00
|
|
|
- store_artifacts:
|
|
|
|
path: coverage/clover.xml
|
|
|
|
prefix: tests
|
|
|
|
- store_artifacts:
|
|
|
|
path: coverage
|
|
|
|
prefix: coverage
|
|
|
|
- store_test_results:
|
|
|
|
path: coverage/clover.xml
|
2018-06-03 08:50:44 -05:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
workflow:
|
|
|
|
jobs:
|
|
|
|
- prepare:
|
2018-06-30 10:30:04 -05:00
|
|
|
<<: *ignore_non_dev_branches
|
2018-06-03 08:50:44 -05:00
|
|
|
- test_node8:
|
|
|
|
requires:
|
|
|
|
- prepare
|
2018-06-30 10:30:04 -05:00
|
|
|
<<: *ignore_non_dev_branches
|
2018-06-03 08:50:44 -05:00
|
|
|
- test_node10:
|
|
|
|
requires:
|
|
|
|
- prepare
|
2018-06-30 10:30:04 -05:00
|
|
|
<<: *ignore_non_dev_branches
|
2018-12-07 00:41:37 -05:00
|
|
|
- test_node11:
|
|
|
|
requires:
|
|
|
|
- prepare
|
|
|
|
<<: *ignore_non_dev_branches
|
2019-04-28 17:20:26 -05:00
|
|
|
- test_node12:
|
|
|
|
requires:
|
|
|
|
- prepare
|
|
|
|
<<: *ignore_non_dev_branches
|
2018-06-03 08:50:44 -05:00
|
|
|
- test_e2e:
|
|
|
|
requires:
|
|
|
|
- prepare
|
2018-06-30 10:30:04 -05:00
|
|
|
<<: *ignore_non_dev_branches
|
2018-06-03 08:50:44 -05:00
|
|
|
- coverage:
|
|
|
|
requires:
|
2018-06-09 11:19:43 -05:00
|
|
|
- test_node8
|
|
|
|
- test_node10
|
2018-12-07 00:41:37 -05:00
|
|
|
- test_node11
|
2019-04-28 17:20:26 -05:00
|
|
|
- test_node12
|
2018-06-09 11:19:43 -05:00
|
|
|
- test_e2e
|
2018-06-30 10:30:04 -05:00
|
|
|
<<: *ignore_non_dev_branches
|