-
-
Notifications
You must be signed in to change notification settings - Fork 140
Add Codecov to Report Test Coverage #1101
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
Conversation
* added PR size labeler * fix permissions * fix permissions * Apply suggestions from code review --------- Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
* fix comment and line breaks * comment test * test changes * this should not trigger another one * fix multiple msg * fix multiple msg * remove test file * Update .github/workflows/codeql.yml Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com> * add test file * delete test file --------- Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
|
Warning This PR exceeds the recommended limit of 1,000 lines.Large PRs are difficult to review and may be rejected due to their size. Please verify that this PR does not address multiple issues. |
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <erik@cloudposse.com>
📝 WalkthroughWalkthroughThis pull request modifies the continuous integration pipeline and build configuration to integrate code coverage metrics. It updates the acceptance test command in the GitHub Actions workflow, adds a conditional step to upload coverage reports using Codecov on Linux, and enhances Makefile targets to run tests with coverage flags and generate HTML reports. Additionally, it introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant CI as GitHub Actions
participant Make as Makefile Targets
participant Test as Acceptance Tests
participant Codecov as Codecov Action
CI->>Make: Execute `make testacc-cover`
Make->>Test: Run acceptance tests with coverage flag (-coverprofile=coverage.out)
Test-->>Make: Return test results
CI->>Make: Execute `make testacc-coverage`
Make->>Test: Generate HTML coverage report (coverage.html)
alt Linux Environment Detected
CI->>Codecov: Upload coverage.out with Codecov action
end
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
codecov.yml (1)
18-21: Resolve YAML Formatting Issues
There are formatting issues reported by YAMLlint—specifically, trailing spaces on line 21 and lack of a newline at the end of the file. Please remove the trailing spaces and ensure the file ends with a newline to improve file quality and adhere to linting standards.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 21-21: no new line character at the end of file
(new-line-at-end-of-file)
[error] 21-21: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/test.yml(1 hunks).gitignore(1 hunks)Makefile(1 hunks)codecov.yml(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .gitignore
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test.yml
164-164: the runner of "codecov/codecov-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
codecov.yml
[error] 21-21: no new line character at the end of file
(new-line-at-end-of-file)
[error] 21-21: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
🔇 Additional comments (6)
.github/workflows/test.yml (1)
160-161: Updated Test Command for Coverage Integration
The acceptance tests step now runs usingmake testacc-cover, which ensures that coverage data is generated during the acceptance tests. This change aligns with the goal of integrating Codecov into the pipeline.codecov.yml (2)
1-10: Good Codecov Coverage Configuration
This section clearly defines the coverage requirements, mandating at least 80% coverage on new or changed lines with a permissible drop of 2%, and automatically detects the base coverage. This well-structured setup should help maintain high test quality.
12-17: Clear PR Comment Configuration
Thecommentblock is concise and specifies a useful layout for PR comments, ensuring that coverage changes are only posted when relevant and compared against the base branch.Makefile (3)
62-64: Add Test Coverage Target
The newtestacc-covertarget is a great addition that runs the tests with coverage enabled using the-coverprofile=coverage.outflag. This change improves the CI pipeline by generating a coverage report without affecting the existing behavior.
66-68: Generate HTML Coverage Report
Thetestacc-coveragetarget, which depends ontestacc-cover, neatly generates an HTML report viago tool cover. This provides additional flexibility for reviewing test coverage metrics.
70-70: PHONY Declaration Updated
Updating the.PHONYdeclaration to includetestacc-coverandtestacc-coverageensures that these targets are always executed, preventing any conflicts with files of the same name. This is a solid adherence to make best practices.
|
These changes were released in v1.165.1. |
what
why
references
Summary by CodeRabbit
Tests
Chores