Skip to content

Commit

Permalink
ci: switch from the unrelieable travis-ci to circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
pscanf committed Jun 2, 2018
1 parent 2584522 commit 3f589e3
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 23 deletions.
58 changes: 58 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,58 @@
version: 2
jobs:
qa:
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Install dependencies
command: yarn install --frozen-lockfile
- run:
name: Compile modules
command: yarn compile
- run:
name: Run linters
command: yarn lint
- run:
name: Run tests and calculate code coverage
command: yarn coverage
- run:
name: Publish code coverage report
command: yarn publish-coverage
npm-publish:
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Install dependencies
command: yarn install --frozen-lockfile
- run:
name: Login to npm
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- run:
name: Compile modules
command: yarn compile
- run:
name: Publish npm modules
command: npm publish

workflows:
version: 2
qa-npm:
jobs:
- qa:
# Run for all branches and all tags
filters:
tags:
only: /.*/
- npm-publish:
requires:
- qa
# Run only for tags starting with a v, don't run for branches
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
[![npm](https://img.shields.io/npm/v/@mondora/env.svg)](https://www.npmjs.com/package/@mondora/env)
[![Build Status](https://travis-ci.org/mondora/env.svg?branch=master)](https://travis-ci.org/mondora/env)
[![Package Version](https://img.shields.io/npm/v/@mondora/env.svg)](https://www.npmjs.com/package/@mondora/env)
[![Build Status](https://img.shields.io/circleci/project/github/mondora/env.svg)](https://circleci.com/gh/mondora/env)
[![Coverage Status](https://img.shields.io/coveralls/mondora/env.svg)](https://coveralls.io/r/mondora/env?branch=master)
[![Dependencies Status](https://david-dm.org/mondora/env.svg)](https://david-dm.org/mondora/env)
[![Dev Dependencies Status](https://david-dm.org/mondora/env/dev-status.svg)](https://david-dm.org/mondora/env#info=devDependencies)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -28,7 +28,7 @@
"lint": "yarn lint:prettier && yarn lint:tslint",
"test": "NODE_ENV=test mocha --exit -r ts-node/register --watch-extensions ts 'test/**/*.ts'",
"coverage": "nyc --all yarn test",
"coveralls": "cat ./coverage/lcov.info | coveralls"
"publish-coverage": "cat ./coverage/lcov.info | coveralls"
},
"dependencies": {},
"devDependencies": {
Expand Down

0 comments on commit 3f589e3

Please sign in to comment.