diff --git a/.codecov.yml b/.codecov.yml index bbe2ee8e93..d03ad99836 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -6,3 +6,13 @@ coverage: default: threshold: 0% # Ref: https://docs.codecov.io/docs/codecovyml-reference#coveragestatus target: auto + +# Since Backstage is a mono repo, flags here help in getting the code coverage of individual packages. +# Documentation: https://docs.codecov.io/docs/flags +flags: + core: + paths: + - packages/core/ + core-api: + paths: + - packages/core-api/ diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f99c266241..bebca7c6f9 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -63,6 +63,9 @@ jobs: run: | yarn lerna -- run test -- --coverage bash <(curl -s https://codecov.io/bash) + # Upload code coverage for some specific flags. Also see .codecov.yml + bash <(curl -s https://codecov.io/bash) -f packages/core/coverage/* -F core + bash <(curl -s https://codecov.io/bash) -f packages/core-api/coverage/* -F core-api # Publishes current version of packages that are not already present in the registry - name: publish