From d5b4d1917e4d754d699acf6fdbd53e037a355983 Mon Sep 17 00:00:00 2001 From: Justin Hall Date: Wed, 19 Dec 2018 23:57:06 -0700 Subject: [PATCH] Move CI from Travis to Circle (#52) --- .circleci/config.yml | 27 +++++++++++++++++++++++++++ .travis.yml | 16 ---------------- README.md | 8 ++++---- 3 files changed, 31 insertions(+), 20 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 00000000..6561c14e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,27 @@ +version: 2 +jobs: + build: + docker: + - image: cypress/base:8 + environment: + # this enables colors in the output + TERM: xterm + working_directory: ~/repo + steps: + - checkout + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ checksum "yarn.lock" }} + - run: + name: Install Dependencies + command: yarn install --frozen-lockfile + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ~/.cache + - run: yarn lint + - run: yarn test:browser:ci + - run: yarn test:coverage --no-cache + - run: ./node_modules/.bin/coveralls < coverage/lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bedd1130..00000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -cache: - directories: - - ~/.npm - - ~/.cache -node_js: - - '10' - - 'node' -install: - - yarn install --frozen-lockfile -script: - - yarn lint - - yarn test:browser:ci - - yarn test:coverage --no-cache -after_success: - - 'coveralls < coverage/lcov.info' diff --git a/README.md b/README.md index 080b36bd..f53f5070 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ _A Promise-based API for querying [Troy Hunt][troy]'s [Have I been pwned?][haveibeenpwned] service._ -[![npm Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] +[![npm Version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Code Coverage][coverage-image]][coverage-url] ## Installation @@ -195,9 +195,9 @@ This module is distributed under the [MIT License][license]. [npm-image]: https://img.shields.io/npm/v/hibp.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/hibp -[travis-image]: - https://img.shields.io/travis/wKovacs64/hibp.svg?style=flat-square&branch=master -[travis-url]: https://travis-ci.org/wKovacs64/hibp +[ci-image]: + https://img.shields.io/circleci/project/github/wKovacs64/hibp/master.svg?style=flat-square +[ci-url]: https://circleci.com/gh/wKovacs64/hibp [coverage-image]: https://img.shields.io/coveralls/wKovacs64/hibp.svg?style=flat-square&branch=master [coverage-url]: https://coveralls.io/github/wKovacs64/hibp?branch=master