-
Notifications
You must be signed in to change notification settings - Fork 106
ci: post code coverage delta comment on PRs #262
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
Summary of ChangesHello @ishymko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the project's continuous integration setup by modifying the Vitest configuration to output a 'json-summary' coverage report. This change is crucial for enabling automated comparison of code coverage metrics, which can help in tracking coverage trends and ensuring code quality over time. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
bf31b7f to
e7c83e9
Compare
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.
Code Review
This pull request adds the json-summary coverage reporter to the Vitest configuration. This change is a standard and correct way to generate a coverage summary, which is often used in CI environments to compare code coverage. The change is straightforward and I have no issues to report.
310104f to
bfee779
Compare
🧪 Code Coverage Delta
Generated by unit-tests.yml |
This reverts commit c2b0e08.
# Description The job added in #262 [is failing on main](https://github.com/a2aproject/a2a-js/actions/runs/20265128688/job/58186385412) as it tries to post a PR comment although there is no PR 🤦 . Fixed by: 1. Add conditions for PR related steps. 2. Bring back publishing coverage report as artifact removed mistakenly in #262. 3. Add a link to this artifact to code coverage comment on PRs.
# Description Original approach from #262 isn't going to work for PRs from forks, as such actions can't have write access to the upstream repo by default and granting this access is not secure. Following the approach with a dedicated [`workflow_run`](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run) triggered workflow which is executed in a secure context. Reference: https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/. Tested in a fork: ishymko#2. Re #192
Description
Post code coverage delta comment on PRs without third-party actions by running tests twice and comparing via a script.
Examples
Fixes #192.