diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..f56ad0bf --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,50 @@ +version: 2.1 + +commands: + test-nodejs: + steps: + - run: + name: Versions + command: npm version + - checkout + - restore_cache: + keys: + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }} + - v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-master-{{ .Environment.CIRCLE_JOB }} + - run: + name: Install dependencies + command: npm ci + - run: + name: NPM Audit + command: npm audit --audit-level=moderate + - run: + name: Test + command: npm test + - save_cache: + key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ arch }}-npm-cache-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }} + paths: + - ~/.npm/_cacache + +jobs: + node-v8: + docker: + - image: circleci/node:8 + steps: + - test-nodejs + node-v10: + docker: + - image: circleci/node:10 + steps: + - test-nodejs + node-v12: + docker: + - image: circleci/node:12 + steps: + - test-nodejs + +workflows: + node-multi-build: + jobs: + - node-v8 + - node-v10 + - node-v12 diff --git a/README.md b/README.md index 1fd3ac72..a5c10e7a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![npm package](https://badge.fury.io/js/oidc-client.svg)](https://www.npmjs.com/package/oidc-client) +[![CircleCI](https://circleci.com/gh/IdentityModel/oidc-client-js/tree/dev.svg?style=svg)](https://circleci.com/gh/IdentityModel/oidc-client-js/tree/dev) # oidc-client