Skip to content

Commit

Permalink
Merge pull request #127 from auth0/add-ci
Browse files Browse the repository at this point in the history
Add CircleCI build and generate coverage
  • Loading branch information
davidpatrick committed Feb 13, 2020
2 parents 73a087d + 6663fc2 commit b8ffdb6
Show file tree
Hide file tree
Showing 6 changed files with 1,275 additions and 13 deletions.
34 changes: 34 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:10
environment:
LANG: en_US.UTF-8
steps:
- checkout
- run:
name: Update NPM version
command: sudo npm install -g npm@latest
- restore-cache:
name: Restore NPM Package Cache
keys:
- npm-packages-{{ checksum "package-lock.json" }}
- npm-packages-
- run:
name: Install Dependencies
command: npm install
- save-cache:
name: Save NPM Package Cache
key: npm-packages-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
- run:
name: Run Tests
command: npm run test:ci
- store_artifacts:
path: ./coverage/lcov-report
- run:
name: Upload Coverage
when: on_success
command: bash <(curl -s https://codecov.io/bash)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ lib-cov
# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# jwks-rsa

[![CircleCI][circle-image]][circle-url]
[![codecov][codecov-image]][codecov-url]
[![NPM version][npm-image]][npm-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
Expand Down Expand Up @@ -131,6 +133,10 @@ jwks Keys: +8ms [ { alg: 'RS256',

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.

[circle-image]: https://img.shields.io/circleci/build/github/auth0/node-jwks-rsa/master?style=flat-square
[circle-url]: https://circleci.com/gh/auth0/node-jwks-rsa/tree/master
[codecov-image]: https://img.shields.io/codecov/c/github/auth0/node-jwks-rsa?style=flat-square
[codecov-url]: https://codecov.io/gh/auth0/node-jwks-rsa
[npm-image]: https://img.shields.io/npm/v/jwks-rsa.svg?style=flat-square
[npm-url]: https://npmjs.org/package/jwks-rsa
[license-image]: http://img.shields.io/npm/l/jwks-rsa.svg?style=flat-square
Expand Down
22 changes: 22 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
coverage:
precision: 2
round: down
range: "80...100"
status:
project:
default:
enabled: true
target: auto
threshold: 1%
if_no_uploads: error
patch:
default:
enabled: true
target: 80%
threshold: 30%
if_no_uploads: error
changes:
default:
enabled: true
if_no_uploads: error
comment: false
Loading

0 comments on commit b8ffdb6

Please sign in to comment.