From f848983623308d1688bef82287c993095315f1c3 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Thu, 12 Nov 2020 12:51:29 -0500 Subject: [PATCH] Remove coveralls reporting (#1149) * Remove coveralls reporting * Update package.json * Delete rewrite-coverage-paths.js * Update continuous-integration.yml --- .github/workflows/continuous-integration.yml | 18 -------------- package.json | 1 - scripts/rewrite-coverage-paths.js | 26 -------------------- 3 files changed, 45 deletions(-) delete mode 100644 scripts/rewrite-coverage-paths.js diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6735af97a..3be3ed8d0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -148,21 +148,3 @@ jobs: uses: codecov/codecov-action@v1 with: flags: ${{ matrix.os }},node_${{ matrix.nodeFlag }},typescript_${{ matrix.typescriptFlag }} - - run: npm run coverage-fix-paths - - run: npm run coverage-report - - name: Coveralls - if: ${{ always() }} - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel: true - finish: - needs: test - runs-on: ubuntu-latest - if: ${{ always() }} - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true diff --git a/package.json b/package.json index 808cf56d9..2e6cc5a1d 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "test-spec": "mocha dist/**/*.spec.js -R spec --bail", "test-cov": "nyc mocha -- \"dist/**/*.spec.js\" -R spec --bail", "test": "npm run build && npm run lint && npm run test-cov", - "coverage-fix-paths": "node ./scripts/rewrite-coverage-paths.js", "coverage-report": "nyc report --reporter=lcov", "prepare": "npm run build-nopack" }, diff --git a/scripts/rewrite-coverage-paths.js b/scripts/rewrite-coverage-paths.js deleted file mode 100644 index 8793839cc..000000000 --- a/scripts/rewrite-coverage-paths.js +++ /dev/null @@ -1,26 +0,0 @@ -const {readdirSync, readFileSync, writeFileSync, statSync} = require('fs') -const {resolve, sep} = require('path') -const {mapKeys, each} = require('lodash') - -const fromPrefix = resolve(__dirname, '../tests/node_modules/ts-node') + sep -const toPrefix = resolve(__dirname, '..') + sep - -function rewritePath(input) { - if(input.indexOf(fromPrefix) === 0) { - return toPrefix + input.slice(fromPrefix.length) - } - return input -} - -const nycOutputDir = resolve(__dirname, '../.nyc_output') -for(const filename of readdirSync(nycOutputDir)) { - const filePath = resolve(nycOutputDir, filename) - if(statSync(filePath).isDirectory()) continue - let json = JSON.parse(readFileSync(filePath, 'utf8')) - json = mapKeys(json, (_, key) => rewritePath(key)) - each(json, obj => { - if(obj.path) - obj.path = rewritePath(obj.path) - }) - writeFileSync(filePath, JSON.stringify(json)) -}