Skip to content

Commit bd38861

Browse files
authored
chore: codecov includes files outside of configured packages (#32748)
The [addition](#32641) of `aws-cdk-lib/core` caused other files from `aws-cdk-lib` to be included in the [report](https://app.codecov.io/github/aws/aws-cdk/tree/main/packages%2Faws-cdk-lib). ![image](https://github.com/user-attachments/assets/5584f55f-9dcd-4afe-829a-ce39cc140e43) The undesired included files are those that are imported by `aws-cdk-lib/core` unit tests. And since they are in the same package, they are included in the jest report. We could exclude them from jest, but that would mean changing the coverage settings for the entire `aws-cdk-lib` package. Instead, we can ask codecov to ignore them. Compare the previous report with this [one](https://app.codecov.io/github/iliapolo/aws-cdk/commit/8263d053b52ca94db42fa9d04c2481dfac5d54ee/tree/packages/aws-cdk-lib), from my fork, that tests the new configuration. ![image](https://github.com/user-attachments/assets/63f24fa5-9e8f-439a-8b19-f876a171e5a9)
1 parent 86d2853 commit bd38861

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ component_management:
3737
# https://docs.codecov.com/docs/ignoring-paths
3838
ignore:
3939
- packages/aws-cdk/lib/cli.ts # we integ test this file
40+
- ^(?!.*packages\/(aws-cdk|aws-cdk-lib\/core)\/).+$ # ignore anything that isn't in the cli or core

0 commit comments

Comments
 (0)