0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

ci(circleci): remove deprecated versions, improve names and coverage (#1495)

This commit is contained in:
Sergio Hg 2019-10-01 22:31:22 +02:00 committed by Juan Picado @jotadeveloper
parent 6c3ca20903
commit c5df28951f

View file

@ -1,36 +1,28 @@
version: 2
aliases:
- &repo_path
~/verdaccio
- &defaults
working_directory: ~/verdaccio
- &node8_executor
working_directory: *repo_path
- &node_latest_browser_executor
docker:
- image: circleci/node:8
- &node12_browser_executor
- image: circleci/node:latest-browsers
- &node_latest_executor
docker:
- image: circleci/node:12-browsers
- &node10_executor
- image: circleci/node:latest
- &node_lts_executor
docker:
- image: circleci/node:10
- &node11_executor
docker:
- image: circleci/node:11
- &node12_executor
docker:
- image: circleci/node:12
- image: circleci/node:lts
- &default_executor
<<: *node12_executor
- &repo_key
repo-{{ .Branch }}-{{ .Revision }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &base_config_key
base-config-{{ .Branch }}-{{ .Revision }}
<<: *node_latest_executor
- &yarn_cache_key
yarn-sha-{{ checksum "yarn.lock" }}
- &coverage_key
coverage-{{ .Branch }}-{{ .Revision }}
- &restore_repo
attach_workspace:
at: ~/verdaccio
at: *repo_path
- &ignore_non_dev_branches
filters:
tags:
@ -47,13 +39,11 @@ jobs:
<<: *default_executor
steps:
- checkout
- restore_cache:
key: *base_config_key
- restore_cache:
key: *yarn_cache_key
- run:
name: Install Js dependencies
command: yarn install --no-progress --registry https://registry.verdaccio.org
name: Install dependencies
command: yarn install --no-progress --pure-lockfile
- run:
name: Prepare CI
command: yarn run pre:ci
@ -67,61 +57,47 @@ jobs:
- ~/.cache/yarn
- node_modules
- persist_to_workspace:
root: ~/verdaccio
root: *repo_path
paths:
- ./*
test_node8:
test_node_latest:
<<: *defaults
<<: *node8_executor
<<: *node_latest_executor
steps:
- *restore_repo
- run:
name: Test with Node 8
command: |
yarn test
yarn test:functional
test_node10:
name: Test with Node Latest
command: yarn run test
- run:
name: Functional test with Node Latest
command: yarn test:functional
- save_cache:
key: *coverage_key
paths:
- coverage
test_node_lts:
<<: *defaults
<<: *node10_executor
<<: *node_lts_executor
steps:
- *restore_repo
- run:
name: Test with Node 10
command: |
yarn run test
yarn test:functional
test_node11:
<<: *defaults
<<: *node11_executor
steps:
- *restore_repo
- run:
name: Test with Node 11
command: |
yarn run test
yarn test:functional
test_node12:
<<: *defaults
<<: *node12_executor
steps:
- *restore_repo
- run:
name: Test with Node 12
command: |
yarn run test
yarn test:functional
name: Test with Node LTS
command: yarn run test
- run:
name: Functional test with Node LTS
command: yarn test:functional
test_e2e:
<<: *defaults
<<: *node12_browser_executor
<<: *node_latest_browser_executor
steps:
- *restore_repo
- run:
name: Test End-to-End
command: yarn run test:e2e
coverage:
<<: *defaults
<<: *default_executor
@ -132,14 +108,8 @@ jobs:
- run:
name: Publish coverage
command: yarn run coverage:publish
- store_artifacts:
path: coverage/clover.xml
prefix: tests
- store_artifacts:
path: coverage
prefix: coverage
- store_test_results:
path: coverage/clover.xml
workflows:
version: 2
@ -147,31 +117,19 @@ workflows:
jobs:
- prepare:
<<: *ignore_non_dev_branches
- test_node8:
- test_node_latest:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node10:
- test_node_lts:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node11:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_node12:
requires:
- prepare
<<: *ignore_non_dev_branches
- test_e2e:
requires:
- prepare
<<: *ignore_non_dev_branches
- coverage:
requires:
- test_node8
- test_node10
- test_node11
- test_node12
- test_e2e
- test_node_latest
<<: *ignore_non_dev_branches