diff --git a/.c8rc.json b/.c8rc.json index d30369ac42..6c9dfafab0 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -1,5 +1,15 @@ { "all": true, + "check-coverage": true, + "reporter": [ + "html", + "text-summary", + "cobertura" + ], + "statements": 56, + "branches": 85, + "functions": 51, + "lines": 56, "include": [ "core/{*.js,frontend,server,shared}" ], diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 966a0baf90..0bc12f53b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -112,8 +112,6 @@ jobs: - run: yarn - run: yarn test:unit - - name: Unit test coverage - run: yarn cov:unit - uses: codecov/codecov-action@v2 - uses: daniellockyer/action-slack-build@master diff --git a/package.json b/package.json index 1808927bfa..b0a140b681 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js --timeout=60000", "test:all": "yarn test:unit && yarn test:integration && yarn test:e2e && yarn lint", "test:debug": "DEBUG=ghost:test* yarn test", - "test:unit": "c8 --reporter text-summary --reporter cobertura mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/unit' --timeout=2000", + "test:unit": "c8 mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/unit' --timeout=2000", "test:integration": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/integration' --timeout=5000", "test:e2e": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/e2e-api' './test/e2e-frontend' './test/e2e-server' --timeout=10000", "test:regression": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000", @@ -39,7 +39,6 @@ "test:int:slow": "yarn test:integration --reporter=mocha-slow-test-reporter", "test:e2e:slow": "yarn test:e2e --reporter=mocha-slow-test-reporter", "test:reg:slow": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000 --reporter=mocha-slow-test-reporter", - "cov:unit": "c8 report --reporter text --reporter html", "lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js'", "lint:shared": "eslint --ignore-path .eslintignore 'core/shared/**/*.js'", "lint:frontend": "eslint --ignore-path .eslintignore 'core/frontend/**/*.js'",