diff --git a/.circleci/config.yml b/.circleci/config.yml index 260b0498..46472f6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,9 @@ jobs: - run: name: test command: npm test + - run: + name: coverage + command: npm run coverage - run: name: Lint all TypeScript code command: npm run lint:ts diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 00000000..c2590e55 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: FFKpllBfCQVsosV2LYOxikIzgwSY4VVHN \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0b1a5bcc..dcd6fae0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ yarn-error.log* # Coverage (from Jest) coverage/ +# Coverage (from nyc) +.nyc_output + # JUnit Reports (used mainly in CircleCI) reports/ junit.xml diff --git a/README.md b/README.md index 03901f90..47df11e7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Apollo Voyager Server +[![CircleCI](https://circleci.com/gh/aerogear/voyager-server.svg?style=svg)](https://circleci.com/gh/aerogear/voyager-server) +[![Coverage Status](https://coveralls.io/repos/github/aerogear/voyager-server/badge.svg)](https://coveralls.io/github/aerogear/voyager-server) + Home of the Aerogear Data Sync Framework. The goal of this project is to make it easier to build secure, production ready, realtime APIs and applications with GraphQL. The project does this by taking the popular [Apollo Server](https://www.apollographql.com/docs/apollo-server/) framework and adding additional components to solve some common problems. diff --git a/package.json b/package.json index f5ed74be..47d8f1a6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "@aerogear/voyager-server-monorepo", "private": true, "scripts": { - "test": "lerna exec -- npm test", + "test": "nyc lerna exec -- npm test", + "coverage": "nyc report --reporter=text-lcov | coveralls", "bootstrap": "lerna bootstrap --no-ci", "clean": "lerna clean --yes", "lint": "npm run lint:ts", @@ -27,12 +28,22 @@ "@types/node": "10.14.3", "@types/pino": "5.20.0", "ava": "1.4.0", + "coveralls": "^3.0.3", "graphql": "14.1.1", "lerna": "3.13.1", + "nyc": "^13.3.0", + "standard": "12.0.1", "ts-node": "8.0.3", "tslint": "5.14.0", - "typescript": "3.3.4000", "typedoc": "0.14.2", - "standard": "12.0.1" + "typescript": "3.3.4000" + }, + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "**/*.test.ts" + ] } } diff --git a/packages/voyager-server/README.md b/packages/voyager-server/README.md index 0402c441..7faaab18 100644 --- a/packages/voyager-server/README.md +++ b/packages/voyager-server/README.md @@ -1,5 +1,3 @@ # voyager-server -[![CircleCI](https://circleci.com/gh/aerogear/voyager-server.svg?style=svg)](https://circleci.com/gh/aerogear/voyager-server) - Apollo Voyager Server makes it easier to build secure, production ready, realtime APIs with GraphQL. [Read the Docs Here](https://github.com/aerogear/voyager-server).