diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..8ff7015 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,81 @@ +version: 2.1 +executors: + base-node: + environment: + FOO: bar + docker: + - image: poetapp/base:10.14.2-alpine + +jobs: + build: + executor: base-node + steps: + - checkout + - restore_cache: + key: v1-{{ checksum "package-lock.json" }} + - run: + name: Install deps + command: npm install + - save_cache: + key: v1-{{ checksum "package-lock.json" }} + paths: + - ./node_modules + + lint: + executor: base-node + steps: + - checkout + - restore_cache: + key: v1-{{ checksum "package-lock.json" }} + - run: + name: Lint + command: npm run lint + + package: + executor: base-node + steps: + - checkout + - restore_cache: + key: v1-{{ checksum "package-lock.json" }} + - run: + name: Build dist + command: npm run build + + coverage: + executor: base-node + steps: + - checkout + - restore_cache: + key: v1-{{ checksum "package-lock.json" }} + - run: + name: Build dist + command: npm run coverage + + release: + executor: base-node + steps: + - checkout + - restore_cache: + key: v1-{{ checksum "package-lock.json" }} + - run: + name: Build dist + command: npx semantic-release + +workflows: + version: 2 + build_and_test: + jobs: + - build + - lint: + requires: + - build + - package: + requires: + - build + - release: + context: semver + requires: + - package + filters: + branches: + only: master diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9b5c436..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update - - sudo apt-get install gcc-5 g++-5 - - sudo rm /usr/bin/g++ - - sudo ln -s /usr/bin/g++-5 /usr/bin/g++ -script: - - npm run lint - - npm run build - - npm run coverage -after_success: - - '[[ $TRAVIS_BRANCH = "master" && $TRAVIS_PULL_REQUEST_BRANCH = "" ]] && - (npm run travis-deploy-once "npm run semantic-release")' \ No newline at end of file