From 4f091a2f811653d6aa1b96c5e19d05ee611faf26 Mon Sep 17 00:00:00 2001 From: Prateek Srivastava Date: Thu, 14 Jun 2018 13:06:23 -0700 Subject: [PATCH 1/3] Migrate to Circle CI 2.0 Circle CI v1 is shutting down on August 31st. This migrates the configuration to Circle 2.0. There should be no functional changes, though we should consider using yarn at some point. --- .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ circle.yml | 30 ------------------------------ 2 files changed, 37 insertions(+), 30 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..47ced288 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2 +jobs: + test: + docker: + - image: circleci/node:4-browsers + steps: + - checkout + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - run: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH + - run: make test + - save_cache: + key: dependency-cache-{{ checksum "package.json" }} + paths: + - node_modules + publish: + docker: + - image: circleci/node:4-browsers + steps: + - attach_workspace: { at: . } + - run: npm publish . +workflows: + version: 2 + test_and_publish: + jobs: + - test: + filters: + tags: + only: /.*/ + - publish: + requires: + - test + filters: + tags: + only: /[0-9]+(\.[0-9]+)*(-.+)?/ + branches: + ignore: /.*/ diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 701a09eb..00000000 --- a/circle.yml +++ /dev/null @@ -1,30 +0,0 @@ -machine: - node: - version: 4 - environment: - NPM_CONFIG_PROGRESS: false - NPM_CONFIG_SPIN: false - TEST_REPORTS_DIR: $CIRCLE_TEST_REPORTS - -dependencies: - pre: - - npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH -# - npm -g install codecov - override: - - make install - -test: - override: - - make test -# XXX(ndhoule): Coverage disabled while supporting IE7/8, see karma.conf.js -# post: -# - cp -R coverage $CIRCLE_ARTIFACTS/ -# - codecov - -deployment: - publish: - owner: segmentio - # Works on e.g. `1.0.0-alpha.1` - tag: /[0-9]+(\.[0-9]+)*(-.+)?/ - commands: - - npm publish . From 2f282a32c13dc14105c2d3363753bf7c51b1d6bf Mon Sep 17 00:00:00 2001 From: Prateek Srivastava Date: Thu, 14 Jun 2018 14:39:16 -0700 Subject: [PATCH 2/3] only publish on master --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47ced288..36dd9f71 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,4 +34,4 @@ workflows: tags: only: /[0-9]+(\.[0-9]+)*(-.+)?/ branches: - ignore: /.*/ + only: master From 1f4613decbf1fdd3850dd1b57238f3163abb63cf Mon Sep 17 00:00:00 2001 From: Prateek Srivastava Date: Thu, 14 Jun 2018 14:45:00 -0700 Subject: [PATCH 3/3] always test --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 36dd9f71..00e94ab9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,10 +23,7 @@ workflows: version: 2 test_and_publish: jobs: - - test: - filters: - tags: - only: /.*/ + - test - publish: requires: - test