Skip to content

Commit

Permalink
Chore(CI): Added coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Jytesh <44925963+Jytesh@users.noreply.github.com>
  • Loading branch information
Jytesh committed Apr 19, 2021
1 parent f03069c commit 395c540
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 27 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,9 @@ jobs:
pg_isready
- run: yarn install
- run: yarn test
- name: Report
run: mkdir -p coverage && yarn run nyc report --reporter=text-lcov > coverage/lcov.info
- name: Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
},
"author": "Jytesh & Kikobeats",
"scripts": {
"test": "lerna run test"
"test": "lerna run test",
"coverage": "nyc report --reporter=text-lcov | npx coveralls"
},
"repository": {
"type": "git",
Expand Down
6 changes: 1 addition & 5 deletions packages/keyv-mongo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"description": "MongoDB storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release:major": "npm test && npm version major -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:minor": "npm test && npm version minor -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:patch": "npm test && npm version patch -m \"chore: release\" && git push origin master --tags && npm publish --access public"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
3 changes: 1 addition & 2 deletions packages/keyv-mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "MySQL/MariaDB storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
3 changes: 1 addition & 2 deletions packages/keyv-postgres/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "PostgreSQL storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava --serial",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava --serial"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
5 changes: 2 additions & 3 deletions packages/keyv-redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"description": "Redis storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "ava",
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava",
"test:docker": "docker-compose up --build --abort-on-container-exit --exit-code-from test",
"posttest:docker": "docker-compose down --rmi local",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"posttest:docker": "docker-compose down --rmi local"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
6 changes: 1 addition & 5 deletions packages/keyv-sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"description": "Parent class for SQL based Keyv storage adapters",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release:major": "npm test && npm version major -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:minor": "npm test && npm version minor -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:patch": "npm test && npm version patch -m \"chore: release\" && git push origin master --tags && npm publish --access public"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
6 changes: 1 addition & 5 deletions packages/keyv-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"description": "SQLite storage adapter for Keyv",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release:major": "npm test && npm version major -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:minor": "npm test && npm version minor -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:patch": "npm test && npm version patch -m \"chore: release\" && git push origin master --tags && npm publish --access public"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down
2 changes: 1 addition & 1 deletion packages/keyv-test-suite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Test suite for Keyv API compliancy",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava",
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"release:major": "npm test && npm version major -m \"chore: release\" && git push origin master --tags && npm publish --access public",
"release:minor": "npm test && npm version minor -m \"chore: release\" && git push origin master --tags && npm publish --access public",
Expand Down
5 changes: 2 additions & 3 deletions packages/keyv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"description": "Simple key-value storage with support for multiple backends",
"main": "src/index.js",
"scripts": {
"test": "xo && nyc ava test/keyv.js",
"test:full": "xo && nyc ava --serial",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava test/keyv.js",
"test:full": "xo && nyc --no-clean --temp-dir ../../.nyc_output ava --serial"
},
"xo": {
"extends": "xo-lukechilds"
Expand Down

0 comments on commit 395c540

Please sign in to comment.