diff --git a/.circleci/config.yml b/.circleci/config.yml index 696fa5fd2d..91c281e711 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,3 +31,6 @@ jobs: - run: name: Test command: yarn test + - run: + name: report-coverage + command: yarn codecov diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..1beb17b8de --- /dev/null +++ b/codecov.yml @@ -0,0 +1,15 @@ +codecov: + notify: + require_ci_to_pass: no +comment: + layout: "header, changes, diff, files" + behavior: default +coverage: + status: + patch: + default: + target: 80% + project: + default: + target: auto + threshold: 1% diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index 6195a5452e..2be955b005 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -6,7 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js", "scripts": { - "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", + "test": "nyc ts-mocha -p tsconfig.json test/**/*.ts", "tdd": "yarn test -- --watch-extensions ts --watch", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", @@ -35,6 +35,17 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "src/index.ts", + "**/*.d.ts", + "build/**/**/*.js" + ], + "all": true + }, "publishConfig": { "access": "public" },