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