From ea6ecc27797e2da5834141ff4f10c25a2af50901 Mon Sep 17 00:00:00 2001 From: zombiej Date: Fri, 13 Dec 2019 12:04:44 +0800 Subject: [PATCH] use circle ci --- .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 17 ----------------- 2 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..e39569065 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2 +jobs: + lint: + docker: + - image: circleci/node:latest + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: npm run lint + test: + docker: + - image: circleci/node:latest + working_directory: ~/repo + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash) +workflows: + version: 2 + build_and_test: + jobs: + - lint + - test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bf8b1dad5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js - -node_js: - - 12 - -script: -- | - if [ "$TEST_TYPE" = test ]; then - npm run coverage && \ - bash <(curl -s https://codecov.io/bash) - else - npm run $TEST_TYPE - fi -env: - matrix: - - TEST_TYPE=lint - - TEST_TYPE=test