From f9eb819c580517100e7aa169fe2ede0b4ee196e5 Mon Sep 17 00:00:00 2001 From: Dara Hayes Date: Fri, 30 Nov 2018 10:48:46 +0000 Subject: [PATCH] fix: initial circle ci config --- .circleci/config.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..b85b95c3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,73 @@ +version: 2 +jobs: + build: + working_directory: ~/aerogear + docker: + # Node 8 LTS + - image: circleci/node:carbon + steps: + - checkout + # Intentionally leaving out the caching bits first to look at build times + # Without caching + # - restore_cache: + # key: dependency-cache-{{ checksum "package.json" }} + - run: + name: install dependencies + command: npm install + - run: + name: bootstrap project + command: npm run bootstrap + - run: + name: compile + command: npm run compile + # - save_cache: + # key: dependency-cache-{{ checksum "package.json" }} + # paths: + # - ./node_modules + # - run: + # # Hoisting will cache some of the packages, but rest needs to be installed separtely + # name: install-package-dependencies-after-cache + # command: npm run bootstrap + - run: + name: run lint + command: npm run lint + - run: + name: test + command: npm test + # - store_artifacts: + # path: test-results.xml + # prefix: tests + # - store_artifacts: + # path: coverage + # prefix: coverage + # - store_test_results: + # path: test-results.xml + npm_publish: + working_directory: ~/aerogear + docker: + # Node 8 LTS + - image: circleci/node:carbon + steps: + - checkout + # Allows us to authenticate with the npm registry + - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc + - run: CI=true npm run release:prep + - run: TAG=$CIRCLE_TAG npm run release:validate + - run: npm run publish + +workflows: + version: 2 + build_and_release: + jobs: + - build: + filters: + tags: + only: /.*/ + - npm_publish: + requires: + - build + filters: + tags: + only: /.*/ # allow anything because tag syntax is validated as part of validate-release.sh + branches: + ignore: /.*/ \ No newline at end of file