mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-13 03:35:52 +01:00
c3c62021e5
* chore: remove ui * chore: remove size step * chore: update theme plugin * chore: update lock file * Update main.workflow * chore: update js-yaml dep * chore: @verdaccio/ui-theme@0.0.4 * feat: allows theme as a plugin * chore: update package description
194 lines
4.5 KiB
YAML
194 lines
4.5 KiB
YAML
version: 2
|
|
|
|
aliases:
|
|
- &defaults
|
|
working_directory: ~/verdaccio
|
|
- &node8_executor
|
|
docker:
|
|
- image: circleci/node:8
|
|
- &node10_browser_executor
|
|
docker:
|
|
- image: circleci/node:10-browsers
|
|
- &node10_executor
|
|
docker:
|
|
- image: circleci/node:10
|
|
- &node11_executor
|
|
docker:
|
|
- image: circleci/node:11.10.1
|
|
- &default_executor
|
|
<<: *node10_executor
|
|
- &repo_key
|
|
repo-{{ .Branch }}-{{ .Revision }}
|
|
- &coverage_key
|
|
coverage-{{ .Branch }}-{{ .Revision }}
|
|
- &base_config_key
|
|
base-config-{{ .Branch }}-{{ .Revision }}
|
|
- &yarn_cache_key
|
|
yarn-sha-{{ checksum "yarn.lock" }}
|
|
- &restore_repo
|
|
attach_workspace:
|
|
at: ~/verdaccio
|
|
- &ignore_non_dev_branches
|
|
filters:
|
|
tags:
|
|
only: /.*/
|
|
branches:
|
|
ignore:
|
|
- gh-pages
|
|
- l10n_master
|
|
- /release\/.*/
|
|
- &execute_on_release
|
|
filters:
|
|
tags:
|
|
only: /v?[0-9]+(\.[0-9]+)+([-+\.][0-9a-zA-Z]+)*/
|
|
branches:
|
|
ignore:
|
|
- /.*/
|
|
|
|
jobs:
|
|
prepare:
|
|
<<: *defaults
|
|
<<: *default_executor
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: *base_config_key
|
|
- run:
|
|
name: 'Base environment setup'
|
|
command: |
|
|
git config --global user.email "verdacciobot@users.noreply.github.com"
|
|
git config --global user.name "Verdaccio bot for Deployments"
|
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
|
echo "machine github.com login verdacciobot password $GITHUB_TOKEN" > ~/.netrc
|
|
- save_cache:
|
|
key: *base_config_key
|
|
paths:
|
|
- ~/.npmrc
|
|
- ~/.gitconfig
|
|
- ~/.netrc
|
|
- restore_cache:
|
|
key: *yarn_cache_key
|
|
- run:
|
|
name: Install Js dependencies
|
|
command: yarn install --no-progress --registry https://registry.verdaccio.org
|
|
- 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
|
|
- persist_to_workspace:
|
|
root: ~/verdaccio
|
|
paths:
|
|
- ./*
|
|
|
|
test_node8:
|
|
<<: *defaults
|
|
<<: *node8_executor
|
|
steps:
|
|
- *restore_repo
|
|
- run:
|
|
name: Test with Node 8
|
|
command: |
|
|
yarn test
|
|
yarn test:functional
|
|
test_node10:
|
|
<<: *defaults
|
|
<<: *node10_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_e2e:
|
|
<<: *defaults
|
|
<<: *node10_browser_executor
|
|
steps:
|
|
- *restore_repo
|
|
- run:
|
|
name: Test End-to-End
|
|
command: yarn run test:e2e
|
|
coverage:
|
|
<<: *defaults
|
|
<<: *default_executor
|
|
steps:
|
|
- *restore_repo
|
|
- restore_cache:
|
|
key: *coverage_key
|
|
- 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
|
|
|
|
publish_package:
|
|
<<: *defaults
|
|
<<: *default_executor
|
|
steps:
|
|
- *restore_repo
|
|
- restore_cache:
|
|
key: *base_config_key
|
|
- run:
|
|
name: Publish
|
|
command: scripts/publish.sh
|
|
|
|
workflows:
|
|
version: 2
|
|
workflow:
|
|
jobs:
|
|
- prepare:
|
|
<<: *ignore_non_dev_branches
|
|
- test_node8:
|
|
requires:
|
|
- prepare
|
|
<<: *ignore_non_dev_branches
|
|
- test_node10:
|
|
requires:
|
|
- prepare
|
|
<<: *ignore_non_dev_branches
|
|
- test_node11:
|
|
requires:
|
|
- prepare
|
|
<<: *ignore_non_dev_branches
|
|
- test_e2e:
|
|
requires:
|
|
- prepare
|
|
<<: *ignore_non_dev_branches
|
|
- coverage:
|
|
requires:
|
|
- test_node8
|
|
- test_node10
|
|
- test_node11
|
|
- test_e2e
|
|
<<: *ignore_non_dev_branches
|
|
- publish_package:
|
|
requires:
|
|
- coverage
|
|
<<: *execute_on_release
|