From bd1780c6e8d294f52f602481ccc57b2fa576be5f Mon Sep 17 00:00:00 2001 From: James Crosby Date: Wed, 31 Jan 2024 11:28:15 +0000 Subject: [PATCH] add coveralls --- .github/workflows/test.yml | 12 ++++++++---- package.json | 8 +++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f16c8eb..f3d403f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: test on: workflow_dispatch: push: - branches: [ "*" ] + pull_request: jobs: test: @@ -16,12 +16,12 @@ jobs: - 8000:8000 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' - name: install deps run: npm ci @@ -36,3 +36,7 @@ jobs: AWS_ACCESS_KEY_ID: dummy AWS_SECRET_ACCESS_KEY: dummy + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + files: .tap/report/lcov.info diff --git a/package.json b/package.json index 55d5589..2a58055 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,15 @@ "description": "Simple Document mapper for DynamoDB, inspired by mongoose.", "main": "index.js", "scripts": { - "test": "tap run --show-full-coverage --allow-incomplete-coverage", + "test": "tap run", "lint": "./node_modules/.bin/eslint -c .eslintrc.json './{,!(node_modules)/**/}*.js'" }, + "tap": { + "show-full-coverage": true, + "allow-incomplete-coverage": true, + "coverage-report": [ "text", "lcovonly" ], + "files": [ "test" ] + }, "files": [ "index.js" ],