From 767d3bffaa9899bc9097077e58edd29589c1eb62 Mon Sep 17 00:00:00 2001 From: m2wasabi Date: Thu, 16 Aug 2018 05:42:05 +0900 Subject: [PATCH 1/2] Hello CircleCI 2.0 --- .circleci/config.yml | 91 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..f251b85 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,91 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:10.8 + environment: + TZ: /usr/share/zoneinfo/Asia/Tokyo + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - run: sudo apt update && sudo apt install python-pip python-dev + - run: pip install awscli --upgrade --user + - run: echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV + - run: yarn --version + - run: yarn install --ignore-scripts --no-progress + - run: npm run build + - save-cache: + key: dependency-cache-{{ checksum "package.json" }} + paths: + - ~/.local + - ~/.npm/_cacache + - ~/.cache/yarn + - node_modules/ + - yarn.lock + - save-cache: + key: artifact-cache-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ref/ + - register/ + - src/index.ts + - src/metaInfo.ts + test: + docker: + - image: circleci/node:10.8 + environment: + TZ: /usr/share/zoneinfo/UTC + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - restore_cache: + key: artifact-cache-{{ .Environment.CIRCLE_SHA1 }} + - run: sudo apt update && sudo apt install python-pip python-dev + - run: pip install awscli --upgrade --user + - run: echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV + - run: npm run test + + npm_release: + docker: + - image: circleci/node:10.8 + environment: + TZ: /usr/share/zoneinfo/UTC + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - restore_cache: + key: dependency-cache-{{ checksum "package.json" }} + - restore_cache: + key: artifact-cache-{{ .Environment.CIRCLE_SHA1 }} + - run: sudo apt update && sudo apt install python-pip python-dev + - run: pip install awscli --upgrade --user + - run: echo 'export PATH=/home/circleci/.local/bin:$PATH' >> $BASH_ENV + - run: npm run semantic-release + +workflows: + version: 2 + workflow: + jobs: + - build: + filters: + branches: + ignore: gh-pages + - test: + requires: + - build + filters: + branches: + ignore: gh-pages + - npm_release: + requires: + - build + - test + filters: + branches: + ignore: gh-pages From 9fedc748377135270531f69fb967af78c0273774 Mon Sep 17 00:00:00 2001 From: m2wasabi Date: Thu, 16 Aug 2018 05:42:23 +0900 Subject: [PATCH 2/2] goodbye CircleCI 1.0 --- circle.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 circle.yml diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 04fbb04..0000000 --- a/circle.yml +++ /dev/null @@ -1,6 +0,0 @@ -machine: - node: - version: 6.9.5 -test: - post: - - npm run semantic-release \ No newline at end of file