Skip to content

ci: use codecov#33723

Merged
hyoban merged 9 commits intomainfrom
3-19-coverage-ci
Mar 19, 2026
Merged

ci: use codecov#33723
hyoban merged 9 commits intomainfrom
3-19-coverage-ci

Conversation

@hyoban
Copy link
Member

@hyoban hyoban commented Mar 19, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fixes #30351

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Copilot AI review requested due to automatic review settings March 19, 2026 03:41
@github-actions github-actions bot added the web This relates to changes on the web. label Mar 19, 2026
@gemini-code-assist
Copy link
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 significantly refactors the project's code coverage infrastructure by eliminating a custom, in-house system for component-level coverage analysis. The change aims to simplify the continuous integration process and leverage a more standardized, external tool for coverage reporting, reducing maintenance overhead and improving the reliability of coverage metrics.

Highlights

  • Removed Custom Code Coverage Scripts: All custom scripts and test files related to component-level diff coverage, coverage filtering, and baseline reporting have been removed from the web/scripts and web/__tests__ directories.
  • Updated Vite Configuration: The web/vite.config.ts file was modified to remove imports and configurations specific to the deprecated custom code coverage system, streamlining the build and test setup.
  • Transition to Codecov: This pull request signifies a shift from a bespoke code coverage solution to integrating Codecov, as indicated by the PR title, which aims to simplify CI/CD and coverage reporting.

🧠 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/web-tests.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.

Copy link
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 effectively removes the custom code coverage checking system, including its associated test files, utility scripts, and configuration within vite.config.ts. This change aligns with the pull request title, indicating a transition to using Codecov. The removal appears clean and does not introduce any new issues in the remaining code.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the web CI coverage reporting from a custom app/components diff/baseline coverage gate to Codecov, simplifying the Vitest coverage configuration and removing the bespoke coverage tooling scripts/tests.

Changes:

  • Replace custom component diff/baseline coverage steps in web-tests.yml with a Codecov upload step.
  • Simplify web/vite.config.ts by removing VITEST_COVERAGE_SCOPE-driven include/exclude logic.
  • Delete now-unused component coverage scripts and their associated unit tests.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web/vite.config.ts Removes component-coverage scoping logic from Vitest coverage configuration.
web/scripts/report-components-test-touch.mjs Removes obsolete “test touch” reporting script.
web/scripts/report-components-coverage-baseline.mjs Removes obsolete baseline coverage reporting script.
web/scripts/components-coverage-thresholds.mjs Removes obsolete thresholds configuration used by the old gate.
web/scripts/components-coverage-common.mjs Removes shared helpers for the old component coverage tooling.
web/scripts/component-coverage-filters.mjs Removes file filtering logic used by the old component coverage tooling.
web/scripts/check-components-diff-coverage.mjs Removes the old blocking diff coverage gate script.
web/scripts/check-components-diff-coverage-lib.spec.ts Removes unit tests for the old diff coverage lib.
web/scripts/check-components-diff-coverage-lib.mjs Removes the old diff coverage library implementation.
web/__tests__/components-coverage-common.test.ts Removes tests for deleted component coverage helpers.
web/__tests__/component-coverage-filters.test.ts Removes tests for deleted component coverage filters.
web/__tests__/check-components-diff-coverage.test.ts Removes tests for deleted diff coverage helper functions.
.github/workflows/web-tests.yml Switches coverage reporting to Codecov during the merge-reports job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 03:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the web test coverage reporting pipeline from custom “app/components” diff/baseline gating scripts to uploading Vitest coverage to Codecov, simplifying CI coverage reporting for the web workspace.

Changes:

  • Remove custom component coverage scripts, thresholds, and their associated unit tests.
  • Simplify vite.config.ts coverage configuration by removing the VITEST_COVERAGE_SCOPE=app-components special-casing.
  • Update the web CI workflow to upload coverage via codecov/codecov-action.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
web/vite.config.ts Removes component-scope coverage logic and related imports.
web/scripts/report-components-test-touch.mjs Deletes advisory “test touch” reporting script.
web/scripts/report-components-coverage-baseline.mjs Deletes baseline coverage reporting script.
web/scripts/components-coverage-thresholds.mjs Deletes per-module/global threshold configuration.
web/scripts/components-coverage-common.mjs Deletes shared helpers used by the removed coverage tooling.
web/scripts/component-coverage-filters.mjs Deletes component coverage exclusion/filtering logic.
web/scripts/check-components-diff-coverage.mjs Deletes the pure diff coverage gate script.
web/scripts/check-components-diff-coverage-lib.spec.ts Deletes unit tests for removed diff-coverage lib.
web/scripts/check-components-diff-coverage-lib.mjs Deletes diff parsing/coverage computation library.
web/__tests__/components-coverage-common.test.ts Deletes tests for removed component coverage helpers.
web/__tests__/component-coverage-filters.test.ts Deletes tests for removed coverage filter logic.
web/__tests__/check-components-diff-coverage.test.ts Deletes tests for removed diff coverage helpers.
.github/workflows/web-tests.yml Replaces custom coverage steps/artifacts with a Codecov upload step; removes reusable workflow inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

hyoban and others added 2 commits March 19, 2026 11:51
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 19, 2026 03:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches the web test coverage reporting approach to use Codecov and removes the repository’s custom app/components coverage gating/reporting scripts and related tests, alongside a few GitHub Action pin bumps.

Changes:

  • Replace custom app/components baseline/diff coverage reporting steps with codecov/codecov-action in the web test workflow.
  • Remove component-coverage scripts, thresholds, and their unit tests; simplify vitest coverage config accordingly.
  • Bump pinned versions/SHAs for several GitHub Actions (UV setup, Claude Code action, anti-slop, setup-vp).

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web/vite.config.ts Removes component-scope coverage configuration and related imports.
web/scripts/report-components-test-touch.mjs Deletes custom “test touch” reporting script.
web/scripts/report-components-coverage-baseline.mjs Deletes baseline coverage reporting script.
web/scripts/components-coverage-thresholds.mjs Deletes stored coverage threshold configuration.
web/scripts/components-coverage-common.mjs Deletes shared helpers for the removed coverage tooling.
web/scripts/component-coverage-filters.mjs Deletes component coverage exclusion logic.
web/scripts/check-components-diff-coverage.mjs Deletes custom diff coverage gate script.
web/scripts/check-components-diff-coverage-lib.mjs Deletes helper library used by the diff coverage gate.
web/scripts/check-components-diff-coverage-lib.spec.ts Removes unit tests for the deleted diff coverage lib.
web/__tests__/components-coverage-common.test.ts Removes tests for deleted component coverage helpers.
web/__tests__/component-coverage-filters.test.ts Removes tests for deleted coverage filters.
web/__tests__/check-components-diff-coverage.test.ts Removes tests for deleted diff coverage logic.
.github/workflows/web-tests.yml Removes custom coverage reporting/gating steps and adds Codecov upload step.
.github/workflows/main-ci.yml Stops passing diff-coverage inputs to web-tests reusable workflow.
.github/workflows/vdb-tests.yml Bumps astral-sh/setup-uv pin.
.github/workflows/translate-i18n-claude.yml Bumps anthropics/claude-code-action pin.
.github/workflows/style.yml Bumps astral-sh/setup-uv pin.
.github/workflows/pyrefly-diff.yml Bumps astral-sh/setup-uv pin.
.github/workflows/db-migration-test.yml Bumps astral-sh/setup-uv pin in both jobs.
.github/workflows/autofix.yml Bumps astral-sh/setup-uv pin.
.github/workflows/api-tests.yml Bumps astral-sh/setup-uv pin.
.github/workflows/anti-slop.yml Pins peakoss/anti-slop to a specific commit SHA.
.github/actions/setup-web/action.yml Pins voidzero-dev/setup-vp to a specific commit SHA.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 19, 2026 04:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces Codecov-based coverage reporting for the web test workflow and removes the repository’s custom web/app/components coverage gating/reporting scripts, while also refreshing a few pinned GitHub Action versions.

Changes:

  • Switch the web test coverage reporting step to codecov/codecov-action and remove the bespoke app/components baseline/diff/test-touch coverage steps.
  • Remove now-unused component coverage scripts and their unit tests, and simplify Vitest coverage configuration accordingly.
  • Update several GitHub Action pins (e.g., setup-uv, claude-code-action, anti-slop, setup-vp).

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web/vite.config.ts Removes VITEST_COVERAGE_SCOPE-based include/exclude logic for component-only coverage runs.
web/scripts/report-components-test-touch.mjs Removes legacy “test touch” reporting script.
web/scripts/report-components-coverage-baseline.mjs Removes legacy baseline coverage reporting script.
web/scripts/components-coverage-thresholds.mjs Removes legacy per-module threshold configuration.
web/scripts/components-coverage-common.mjs Removes shared helpers for the legacy component coverage gating pipeline.
web/scripts/component-coverage-filters.mjs Removes legacy logic for excluding component files from coverage gating.
web/scripts/check-components-diff-coverage.mjs Removes legacy diff-coverage gate implementation for web/app/components.
web/scripts/check-components-diff-coverage-lib.spec.ts Removes unit tests for legacy diff-coverage lib.
web/scripts/check-components-diff-coverage-lib.mjs Removes legacy diff-coverage parsing/analysis library.
web/config/index.ts Minor formatting change to VAR_REGEX export.
web/__tests__/components-coverage-common.test.ts Removes tests for deleted legacy coverage helpers.
web/__tests__/component-coverage-filters.test.ts Removes tests for deleted legacy coverage filters.
web/__tests__/check-components-diff-coverage.test.ts Removes tests for deleted legacy diff coverage helpers.
.github/workflows/web-tests.yml Replaces legacy coverage gating/reporting steps with Codecov upload action.
.github/workflows/main-ci.yml Removes now-unused inputs passed to web-tests reusable workflow.
.github/workflows/api-tests.yml Updates astral-sh/setup-uv pin.
.github/workflows/vdb-tests.yml Updates astral-sh/setup-uv pin.
.github/workflows/style.yml Updates astral-sh/setup-uv pin.
.github/workflows/pyrefly-diff.yml Updates astral-sh/setup-uv pin.
.github/workflows/db-migration-test.yml Updates astral-sh/setup-uv pin.
.github/workflows/autofix.yml Updates astral-sh/setup-uv pin.
.github/workflows/translate-i18n-claude.yml Updates anthropics/claude-code-action pin.
.github/workflows/anti-slop.yml Pins peakoss/anti-slop to a specific commit/version.
.github/actions/setup-web/action.yml Updates voidzero-dev/setup-vp pin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hyoban hyoban marked this pull request as ready for review March 19, 2026 05:23
Copilot AI review requested due to automatic review settings March 19, 2026 05:23
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 19, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 19, 2026
@hyoban hyoban merged commit 77b8012 into main Mar 19, 2026
29 checks passed
@hyoban hyoban deleted the 3-19-coverage-ci branch March 19, 2026 05:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the web test coverage reporting pipeline from a custom “app/components” diff-coverage gate to Codecov-based reporting, simplifying the CI surface area and removing now-unneeded coverage scripts.

Changes:

  • Integrate Codecov upload into the Web Tests reusable workflow and wire it through main-ci via secrets: inherit.
  • Remove the custom component diff-coverage/baseline/test-touch scripts and their associated tests.
  • Minor CI dependency pin updates (UV setup action, Claude action, anti-slop, setup-vp) and a small formatting change in web/config/index.ts.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/vite.config.ts Removes component-coverage-scope logic from Vitest coverage config.
web/scripts/report-components-test-touch.mjs Deletes advisory “test touch” reporting script.
web/scripts/report-components-coverage-baseline.mjs Deletes baseline coverage summary script.
web/scripts/components-coverage-thresholds.mjs Deletes component coverage thresholds configuration.
web/scripts/components-coverage-common.mjs Deletes shared helpers used by the removed component coverage tooling.
web/scripts/component-coverage-filters.mjs Deletes file classification/filter logic used by the removed tooling.
web/scripts/check-components-diff-coverage.mjs Deletes the “pure diff coverage” gating script.
web/scripts/check-components-diff-coverage-lib.mjs Deletes the library used by the diff coverage script.
web/scripts/check-components-diff-coverage-lib.spec.ts Deletes unit tests for the removed diff-coverage lib.
web/__tests__/components-coverage-common.test.ts Deletes tests for removed component coverage helpers.
web/__tests__/component-coverage-filters.test.ts Deletes tests for removed component coverage filters.
web/__tests__/check-components-diff-coverage.test.ts Deletes tests for removed diff coverage logic.
.github/workflows/web-tests.yml Adds Codecov upload step; removes custom coverage reporting/gating steps.
.github/workflows/main-ci.yml Updates web-tests reusable workflow invocation to secrets: inherit.
.github/workflows/vdb-tests.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/style.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/pyrefly-diff.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/db-migration-test.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/autofix.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/api-tests.yml Bumps astral-sh/setup-uv action pin.
.github/workflows/translate-i18n-claude.yml Bumps anthropics/claude-code-action pin.
.github/workflows/anti-slop.yml Pins peakoss/anti-slop to a commit SHA.
.github/actions/setup-web/action.yml Pins voidzero-dev/setup-vp to a commit SHA.
web/config/index.ts Formats VAR_REGEX declaration to a single line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +85 to +92
- name: Report coverage
if: ${{ env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
with:
name: web-coverage-report
path: web/coverage
retention-days: 30
if-no-files-found: error
directory: web/coverage
flags: web
env:
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}
@codecov
Copy link

codecov bot commented Mar 19, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] Introduce Codecov for test coverage

3 participants