Skip to content

Commit

Permalink
chore: codecov includes files outside of configured packages (#32748)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
iliapolo authored Jan 6, 2025
1 parent 86d2853 commit bd38861
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ component_management:
# https://docs.codecov.com/docs/ignoring-paths
ignore:
- packages/aws-cdk/lib/cli.ts # we integ test this file
- ^(?!.*packages\/(aws-cdk|aws-cdk-lib\/core)\/).+$ # ignore anything that isn't in the cli or core

0 comments on commit bd38861

Please sign in to comment.