Update to circleci v2 (#7451)
This commit is contained in:
parent
1a454f666c
commit
586ba35950
61
.circleci/config.yml
Normal file
61
.circleci/config.yml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
version: 2
|
||||||
|
aliases:
|
||||||
|
- &restore-node-modules-cache
|
||||||
|
keys:
|
||||||
|
- v1-yarn-deps-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
|
- &restore-yarn-cache
|
||||||
|
keys:
|
||||||
|
- v1-yarn-cache
|
||||||
|
|
||||||
|
- &save-node-modules-cache
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
key: v1-yarn-deps-{{ checksum "yarn.lock" }}
|
||||||
|
|
||||||
|
- &save-yarn-cache
|
||||||
|
paths:
|
||||||
|
- ~/.yarn-cache
|
||||||
|
key: v1-yarn-cache
|
||||||
|
|
||||||
|
- &yarn-install
|
||||||
|
run: |
|
||||||
|
sudo npm i -g yarn@^1.5.1
|
||||||
|
yarn --version
|
||||||
|
|
||||||
|
- &artifact_babel
|
||||||
|
path: ~/babel/packages/babel-standalone/babel.js
|
||||||
|
|
||||||
|
- &artifact_babel_min
|
||||||
|
path: ~/babel/packages/babel-standalone/babel.min.js
|
||||||
|
|
||||||
|
- &artifact_env
|
||||||
|
path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.js
|
||||||
|
|
||||||
|
- &artifact_env_min
|
||||||
|
path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.min.js
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
working_directory: ~/babel
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:8
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- restore-cache: *restore-yarn-cache
|
||||||
|
- restore-cache: *restore-node-modules-cache
|
||||||
|
- *yarn-install
|
||||||
|
- run: make test-ci-coverage
|
||||||
|
# Builds babel-standalone with the regular Babel config
|
||||||
|
- run: make build
|
||||||
|
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage
|
||||||
|
# data for a JS file that's several megabytes large is bound to fail. Here,
|
||||||
|
# we just run the babel-standalone test separately.
|
||||||
|
- run: ./node_modules/mocha/bin/_mocha packages/babel-standalone/test/ --opts test/mocha.opts
|
||||||
|
- run: ./node_modules/mocha/bin/_mocha packages/babel-preset-env-standalone/test/ --opts test/mocha.opts
|
||||||
|
- store_artifacts: *artifact_babel
|
||||||
|
- store_artifacts: *artifact_babel_min
|
||||||
|
- store_artifacts: *artifact_env
|
||||||
|
- store_artifacts: *artifact_env_min
|
||||||
|
- save_cache: *save-node-modules-cache
|
||||||
|
- save_cache: *save-yarn-cache
|
||||||
30
circle.yml
30
circle.yml
@ -1,30 +0,0 @@
|
|||||||
general:
|
|
||||||
artifacts:
|
|
||||||
- "packages/babel-standalone/babel.js"
|
|
||||||
- "packages/babel-standalone/babel.min.js"
|
|
||||||
- "packages/babel-preset-env-standalone/babel-preset-env.js"
|
|
||||||
- "packages/babel-preset-env-standalone/babel-preset-env.min.js"
|
|
||||||
|
|
||||||
machine:
|
|
||||||
node:
|
|
||||||
version:
|
|
||||||
8
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
pre:
|
|
||||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
|
||||||
cache_directories:
|
|
||||||
- ~/.yarn-cache
|
|
||||||
override:
|
|
||||||
- yarn
|
|
||||||
|
|
||||||
test:
|
|
||||||
override:
|
|
||||||
- make test-ci-coverage
|
|
||||||
# Builds babel-standalone with the regular Babel config
|
|
||||||
- make build
|
|
||||||
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage
|
|
||||||
# data for a JS file that's several megabytes large is bound to fail. Here,
|
|
||||||
# we just run the babel-standalone test separately.
|
|
||||||
- ./node_modules/mocha/bin/_mocha packages/babel-standalone/test/ --opts test/mocha.opts
|
|
||||||
- ./node_modules/mocha/bin/_mocha packages/babel-preset-env-standalone/test/ --opts test/mocha.opts
|
|
||||||
Loading…
x
Reference in New Issue
Block a user