From cdbee66562b19885ae43e319e27d740d7271efd1 Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Mon, 19 Sep 2022 04:25:39 -0600 Subject: [PATCH 1/5] ci: Adding coverall action --- .github/workflows/build-test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6fe853c..c0a941c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -17,3 +17,8 @@ jobs: npm test env: CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./docs/coverage/lcov.info From d66d2d444a48b1ca6b4e34b0fef76294788019e5 Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Mon, 19 Sep 2022 04:57:16 -0600 Subject: [PATCH 2/5] ci: Adding coverage and coveralls --- .github/workflows/build-test.yml | 5 ----- package-lock.json | 3 +-- package.json | 4 +++- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index c0a941c..6fe853c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -17,8 +17,3 @@ jobs: npm test env: CI: true - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: ./docs/coverage/lcov.info diff --git a/package-lock.json b/package-lock.json index 3167427..a4ead9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,7 @@ "typescript": "^4.8.3" }, "engines": { - "node": ">= 12.4", - "npm": ">= 6.x" + "npm": ">= 8.x" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index 1d3be07..2219045 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,15 @@ "typescript": "^4.8.3" }, "scripts": { - "clean": "rm -rf dist test-dist", + "clean": "rm -rf dist; rm -rf test-dist; rm -rf .test_run", "test:compile": "tsc -b test", "test:copy_node_modules": "cpy \"node_modules/**/*\" ../test-dist/", "test:run": "mocha --config .mocharc.js", "test:build": "npm-run-all build test:compile test:copy_node_modules", "test": "npm-run-all test:build test:run", "report": "nyc report", + "coverage": "nyc mocha --config .mocharc.js", + "coveralls": "nyc report --reporter=text-lcov | coveralls", "build": "npm run clean && tsc" }, "files": [ From e5754d4ee42aa18cf8188cfe51b5e265956e6a99 Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Mon, 19 Sep 2022 05:10:07 -0600 Subject: [PATCH 3/5] ci: Trying coveralls again --- .github/workflows/build-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6fe853c..f36985c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -14,6 +14,11 @@ jobs: run: | npm install npm run build --if-present - npm test + npm run coverage env: CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./docs/coverage/lcov.info From 5cf697a164777bb3b4a9d67326396c6a06e0efd1 Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Mon, 19 Sep 2022 05:11:44 -0600 Subject: [PATCH 4/5] ci: Adding test step before coverage --- .github/workflows/build-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f36985c..4482fb6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -14,6 +14,7 @@ jobs: run: | npm install npm run build --if-present + npm run test npm run coverage env: CI: true From c22a08d8d30860019428557e72d3530918df64ab Mon Sep 17 00:00:00 2001 From: Kevin Gilland Date: Mon, 19 Sep 2022 05:39:51 -0600 Subject: [PATCH 5/5] ci: Calling test:rrun from coverage --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2219045..517c426 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "test:build": "npm-run-all build test:compile test:copy_node_modules", "test": "npm-run-all test:build test:run", "report": "nyc report", - "coverage": "nyc mocha --config .mocharc.js", + "coverage": "nyc npm run test:run", "coveralls": "nyc report --reporter=text-lcov | coveralls", "build": "npm run clean && tsc" },