Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: code coverage must never decrease rule #31931

Closed
Tracked by #31929
mrgrain opened this issue Oct 29, 2024 · 3 comments · Fixed by #32079
Closed
Tracked by #31929

cli: code coverage must never decrease rule #31931

mrgrain opened this issue Oct 29, 2024 · 3 comments · Fixed by #32079
Assignees
Labels
@aws-cdk/core Related to core CDK functionality cli Issues related to the CDK CLI p1

Comments

@mrgrain
Copy link
Contributor

mrgrain commented Oct 29, 2024

Overview

Add a PR check that coverage for the aws-cdk package (the CLI) must never decrease compared to main.

Background

The AWS CLI currently requires comparatively low coverage by tests:

statements: 60
branches: 45

The actual coverage is thankfully higher:

=============================== Coverage summary ===============================
Statements   : 81.59% ( 5462/6694 )
Branches     : 68.05% ( 1764/2592 )
Functions    : 84.49% ( 1128/1335 )
Lines        : 81.9% ( 5211/6362 )
================================================================================

However we should ideally have 90%+ on all these. In the meantime, add a PR check that coverage must never decrease.

@mrgrain mrgrain changed the title Test coverage increase rule for CLI Pull Requests Test coverage must always increase rule for CLI Pull Requests Oct 29, 2024
@mrgrain mrgrain added p1 @aws-cdk/core Related to core CDK functionality cli Issues related to the CDK CLI labels Oct 29, 2024
@mrgrain
Copy link
Contributor Author

mrgrain commented Oct 29, 2024

In #31936 we upped the minimal coverage to current levels. We still want a PR check to prevent a decrease compared to main.

mergify bot pushed a commit that referenced this issue Oct 29, 2024
### Issue

Relates to #31931

### Reason for this change

The AWS CLI currently requires comparatively low coverage by tests:
```
statements: 60
branches: 45
```

The actual coverage is thankfully higher:

```
=============================== Coverage summary ===============================
Statements   : 81.59% ( 5462/6694 )
Branches     : 68.05% ( 1764/2592 )
Functions    : 84.49% ( 1128/1335 )
Lines        : 81.9% ( 5211/6362 )
================================================================================
```

Make sure we don't drop below the current values.


### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@iliapolo iliapolo self-assigned this Nov 4, 2024
@iliapolo iliapolo changed the title Test coverage must always increase rule for CLI Pull Requests Test coverage must never decrease rule for CLI Pull Requests Nov 9, 2024
@mergify mergify bot closed this as completed in #32079 Nov 11, 2024
@mergify mergify bot closed this as completed in c5e738e Nov 11, 2024
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
@iliapolo iliapolo changed the title Test coverage must never decrease rule for CLI Pull Requests cli: code coverage must never decrease rule Nov 11, 2024
@iliapolo iliapolo added this to the CLI Testing Posture | Phase 1 milestone Nov 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/core Related to core CDK functionality cli Issues related to the CDK CLI p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants