Skip to content

Re-enable coverage reporting for firebase-js-sdk#9761

Open
macastelaz wants to merge 4 commits intomainfrom
code-coverage-reporting
Open

Re-enable coverage reporting for firebase-js-sdk#9761
macastelaz wants to merge 4 commits intomainfrom
code-coverage-reporting

Conversation

@macastelaz
Copy link
Copy Markdown

Re-enable coverage reporting for the firebase-js-sdk which had previosly been turned off by #9101. Additional details can be found in go/firebase-js-sdk-coverage

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

Discussed internally and given this was already on the team's roadmap, I am short-circuiting a few of the norm contrib steps like filing an issue.

Testing

  • N/A - changes are for a github workflow. Note that I have manually tested this on a clone of the repo and results can be seen in go/firebase-js-sdk-coverage

API Changes

N/A

…usly been turned off by #9101. Additional details can be found in go/firebase-js-sdk-coverage
@macastelaz macastelaz requested a review from a team as a code owner March 25, 2026 21:42
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: c31cd82

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 restores code coverage reporting for the Firebase JavaScript SDK. It achieves this by configuring the webpack test setup to use a Babel plugin for code instrumentation, ensuring that test runs generate coverage data. This change is crucial for maintaining code quality and identifying untested areas within the SDK.

Highlights

  • Coverage Reporting Re-enabled: Re-enabled code coverage reporting for the firebase-js-sdk, which was previously turned off.
  • Babel Plugin for Instrumentation: Integrated babel-plugin-istanbul into the webpack test configuration to instrument code for coverage analysis.
  • Dependency Updates: Updated package.json and yarn.lock to include the new babel-plugin-istanbul dependency and various updated Babel-related packages.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/test-all.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Comment on lines +268 to +276
name: Finalize Coveralls
needs: [test-the-rest-coverage, test-auth-coverage, test-firestore-coverage]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 introduces code instrumentation for test coverage using babel-plugin-istanbul in the webpack configuration. This instrumentation is activated when running in a CI environment or when the COVERAGE environment variable is explicitly set to 'true'. A review comment points out a potential issue with the process.env.CI check, as process.env.CI set to the string 'false' would still evaluate to true, potentially enabling coverage unintentionally. A more robust check is suggested to explicitly handle this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants