Skip to content

Conversation

@rodrigok
Copy link
Member

@rodrigok rodrigok commented Nov 10, 2025

https://rocketchat.atlassian.net/browse/ARCH-1854

Depends on #37466

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores

    • Centralized per-shard coverage collection, merging, and unified upload flow; replaced multiple per-type uploads with a single consolidated store step.
    • Made coverage paths and filenames configurable via public environment variables and standardized listings/tracing.
  • New Features

    • Added a dedicated coverage reporting job to aggregate, generate LCOV reports and publish coverage.
    • Added a merge step for UI coverage files.
  • Bug Fixes

    • CI test reporter set to produce lcov-only output for reliable collection.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 10, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

⚠️ No Changeset found

Latest commit: 4ba7db6

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Centralizes CI coverage handling: adds COVERAGE_DIR/COVERAGE_FILE_NAME/COVERAGE_REPORTER, consolidates per-shard uploads into a single "Store coverage" step, adds a "Merge ui coverage files" step, updates docker-compose coverage mounting, adjusts nyc reporter, and introduces a new report-coverage job that assembles LCOV reports and publishes to Codecov.

Changes

Cohort / File(s) Summary
CI E2E test workflow
​.github/workflows/ci-test-e2e.yml
Add COVERAGE_DIR/COVERAGE_FILE_NAME/COVERAGE_REPORTER env vars; always prepare coverage dir (with xtrace); append " coverage" to MongoDB job name when coverage enabled; add "Merge ui coverage files" step; replace per-type per-shard uploads with a single public "Store coverage" artifact step (uploads /tmp/coverage as coverage-${{ inputs.type }}-${{ matrix.shard }}); remove passing COVERAGE_DIR/COVERAGE_REPORTER from some container env blocks; change coverage listings to ls -la.
Main CI workflow & report job
​.github/workflows/ci.yml
Add report-coverage job (📊 Report Coverage) running on ubuntu-24.04 that needs test jobs, downloads coverage-* artifacts, runs nyc to produce LCOV for API/UI, uploads reports-coverage, and runs Codecov uploads with flags e2e-api and e2e. Also simplify DOCKER_TAG_SUFFIX_ROCKETCHAT logic to only depend on matrix.type == 'coverage'.
Coverage plugin
apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js
Read COVERAGE_FILE_NAME env var, log generation parameters, and call reports.create(reporter, { file: fileName }) to emit the coverage file at the configured path.
App & container config
apps/meteor/package.json, docker-compose-ci.yml
Change test:e2e:nyc reporter from lcov to lcovonly; rocketchat service volume mapping uses ${COVERAGE_DIR:-/tmp/coverage} and adds COVERAGE_FILE_NAME env var; remove DENO_VERSION build-arg from presence-service.

Sequence Diagram(s)

sequenceDiagram
    participant Runner
    participant E2E as E2E Jobs (api/ui)
    participant Merge as Merge UI Coverage
    participant Store as Store Coverage (artifact)
    participant Report as report-coverage Job
    participant Codecov

    Note over E2E: Each test shard writes .nyc_output into COVERAGE_DIR
    Runner->>E2E: run tests → write .nyc_output to COVERAGE_DIR
    E2E->>Merge: run nyc merge for UI shards → produce COVERAGE_FILE_NAME per shard
    Merge->>Store: place coverage-{type}-{shard} under artifact path
    Store->>Runner: upload artifact coverage-{type}-{shard}
    Runner->>Report: download coverage-* artifacts
    Report->>Report: nyc combine/report → generate LCOV for API and UI
    Report->>Codecov: upload LCOV (flag: e2e-api)
    Report->>Codecov: upload LCOV (flag: e2e)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Pay extra attention to:
    • .github/workflows/ci-test-e2e.yml — COVERAGE_DIR lifecycle, merge step correctness, artifact naming and matrix/shard interpolation.
    • .github/workflows/ci.yml — artifact download patterns, nyc invocations, and the introduced report-coverage job (deduplicate if duplicated).
    • docker-compose-ci.yml — bind mount expansion ${COVERAGE_DIR:-...} and COVERAGE_FILE_NAME propagation.
    • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js — ensure nyc/reports.create API usage and file emission.

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰
I hopped through CI with nimble paws,
I gathered shards and stitched the laws,
Merged UI bits into one bright stream,
Sent LCOV beacons for the green check's gleam,
A crunchy carrot for the pipeline's cause 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reorganizing coverage reporting in CI/CD workflow to occur after tests complete, with centralized coverage handling and a new report-coverage job.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/ci-improvements-2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8e80445 and 4ba7db6.

📒 Files selected for processing (5)
  • .github/workflows/ci-test-e2e.yml (5 hunks)
  • .github/workflows/ci.yml (4 hunks)
  • apps/meteor/package.json (1 hunks)
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (2 hunks)
  • docker-compose-ci.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js
  • docker-compose-ci.yml
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Avoid code comments in the implementation

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)

Applied to files:

  • apps/meteor/package.json
  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/package.json
  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/package.json
🪛 actionlint (1.7.8)
.github/workflows/ci.yml

623-623: 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)


633-633: 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)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: 🚢 Build Docker (amd64, account-service, presence-service, stream-hub-service, omnichannel-tran...
  • GitHub Check: 🚢 Build Docker (amd64, rocketchat, coverage)
  • GitHub Check: 🚢 Build Docker (amd64, authorization-service, queue-worker-service, ddp-streamer-service, cove...
  • GitHub Check: 🚢 Build Docker (arm64, account-service, presence-service, stream-hub-service, omnichannel-tran...
  • GitHub Check: 🚢 Build Docker (arm64, rocketchat, coverage)
  • GitHub Check: 🚢 Build Docker (arm64, authorization-service, queue-worker-service, ddp-streamer-service, cove...
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (7)
apps/meteor/package.json (1)

38-38: Aligns test coverage reporter with centralized coverage strategy.

The switch from lcov to lcovonly reporter is correct—it generates only the LCOV format (no HTML), matching the new centralized coverage aggregation flow in the report-coverage job (.github/workflows/ci.yml lines 612–613).

.github/workflows/ci.yml (1)

332-332: Correct simplification of DOCKER_TAG_SUFFIX_ROCKETCHAT for secondary services.

The simplified form ${{ matrix.type == 'coverage' && '-cov' || '' }} is appropriate for services[1–3], since these don't require the event-name check that the primary Rocketchat service needs (line 319).

Also applies to: 346-346, 360-360

.github/workflows/ci-test-e2e.yml (5)

81-83: Coverage environment variables correctly centralize coverage handling.

The three new variables establish a consistent, hierarchical coverage directory structure and enable the centralized aggregation strategy:

  • COVERAGE_DIR provides a type-specific base path
  • COVERAGE_FILE_NAME ensures consistent naming across shards
  • COVERAGE_REPORTER gates coverage collection based on MongoDB version

This aligns well with the new report-coverage job in ci.yml.


91-91: Job name enhancement improves workflow visibility.

Appending the coverage indicator to the job name makes it clear in the GitHub UI when a shard is running with coverage enabled. Good UX improvement.


163-166: Coverage directory setup is correct.

The addition of set -o xtrace for debugging and proper permission setting with chmod 777 supports the centralized coverage collection flow.


243-248: "Merge ui coverage files" step correctly consolidates coverage data.

The nyc merge command properly combines .nyc_output files from parallel Playwright test workers into a single JSON coverage file. The conditional gating on both ui type and coverage version match is correct.


266-271: "Store coverage" step correctly packages artifacts for the new report-coverage job.

The artifact naming pattern coverage-${{ inputs.type }}-${{ matrix.shard }} matches the download pattern in ci.yml (pattern: coverage-*), and the /tmp/coverage path aligns with the centralized coverage directory hierarchy. The include-hidden-files flag ensures .nyc_output coverage data is preserved.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.99%. Comparing base (b4cf623) to head (4ba7db6).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37467      +/-   ##
===========================================
+ Coverage    68.10%   68.99%   +0.88%     
===========================================
  Files         3364     3357       -7     
  Lines       115755   114236    -1519     
  Branches     20910    20558     -352     
===========================================
- Hits         78838    78819      -19     
+ Misses       34220    33329     -891     
+ Partials      2697     2088     -609     
Flag Coverage Δ
e2e 57.43% <ø> (-0.01%) ⬇️
e2e-api 43.78% <ø> (+3.24%) ⬆️
unit 72.14% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rodrigok rodrigok force-pushed the chore/ci-improvements branch from 919c824 to dd64bc9 Compare November 10, 2025 20:18
@rodrigok rodrigok force-pushed the chore/ci-improvements-2 branch 2 times, most recently from bdf7389 to d3d6a00 Compare November 10, 2025 20:34
@rodrigok rodrigok changed the title chore(ci): remove unused dependencies and report coverage after tests only chore(ci): report coverage after tests only Nov 10, 2025
ggazzo
ggazzo previously approved these changes Nov 11, 2025
@rodrigok rodrigok marked this pull request as ready for review November 11, 2025 12:09
@rodrigok rodrigok requested a review from a team as a code owner November 11, 2025 12:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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)
apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (1)

10-10: Consider documenting the optional COVERAGE_FILE_NAME variable.

The fileName variable is read from the environment but isn't validated or documented. Consider adding a comment explaining that this is optional and what happens when it's not set.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dd64bc9 and d3d6a00.

📒 Files selected for processing (5)
  • .github/workflows/ci-test-e2e.yml (5 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • apps/meteor/package.json (1 hunks)
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (2 hunks)
  • docker-compose-ci.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Avoid code comments in the implementation

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)

Applied to files:

  • apps/meteor/package.json
  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/package.json
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/package.json
  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/package.json
🪛 actionlint (1.7.8)
.github/workflows/ci.yml

623-623: 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)


633-633: 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)

🔇 Additional comments (10)
apps/meteor/package.json (1)

38-38: LGTM! Optimized reporter for CI.

The change from lcov to lcovonly is appropriate for CI environments. The lcovonly reporter generates only the lcov.info file needed for coverage reporting tools, skipping the HTML report generation, which improves efficiency.

docker-compose-ci.yml (2)

4-4: LGTM! Centralized coverage directory configuration.

The use of ${COVERAGE_DIR:-/tmp/coverage} with a default value provides flexibility for CI configuration while maintaining a sensible fallback.


26-26: LGTM! Coverage file name now configurable.

Adding COVERAGE_FILE_NAME as an environment variable enables per-test-type or per-shard coverage file naming, which aligns with the centralized coverage approach in this PR.

apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (1)

49-50: LGTM! Enhanced coverage file naming.

The addition of customizable file naming via COVERAGE_FILE_NAME and the debug logging will help with troubleshooting coverage generation. The file option is supported by istanbul-reports for the reporters used in this codebase.

.github/workflows/ci-test-e2e.yml (5)

81-83: LGTM! Centralized coverage configuration.

The introduction of COVERAGE_DIR, COVERAGE_FILE_NAME, and COVERAGE_REPORTER environment variables successfully centralizes coverage handling across the workflow, making it easier to maintain and configure.


91-91: LGTM! Improved job name clarity.

The conditional coverage suffix in the job name makes it immediately clear which jobs are collecting coverage data.


163-166: LGTM! Enhanced debugging and directory setup.

The addition of set -o xtrace aids in debugging, and always creating/chmod-ing the coverage directory ensures consistency regardless of whether coverage is enabled.


243-248: LGTM! Essential coverage merging for UI tests.

The nyc merge step correctly consolidates multiple coverage files from .nyc_output (generated during Playwright test execution) into a single coverage file per shard, which is necessary for proper coverage aggregation.


266-271: LGTM! Consolidated coverage artifact upload.

The unified coverage upload step with a consistent naming pattern (coverage-${type}-${shard}) simplifies artifact management and aligns with the centralized coverage approach.

.github/workflows/ci.yml (1)

608-613: Verify the nyc report command arguments.

The --temp-dir paths are correct. Coverage artifacts are uploaded from ci-test-e2e.yml with names coverage-${{ inputs.type }}-${{ matrix.shard }} containing path /tmp/coverage, where COVERAGE_DIR: '/tmp/coverage/${{ inputs.type }}' structures data by type (api/ui). When downloaded with pattern coverage-* to /tmp/coverage using merge-multiple: true, the result is:

  • /tmp/coverage/api/ (merged from all coverage-api-* shards)
  • /tmp/coverage/ui/ (merged from all coverage-ui-* shards)

The nyc commands at lines 612-613 correctly reference these paths.

Comment on lines +588 to +640
report-coverage:
name: 📊 Report Coverage
runs-on: ubuntu-24.04
needs: [release-versions, test-api-ee, test-ui-ee, test-ui-ee-watcher]

steps:
- uses: actions/checkout@v5

- name: Use Node.js
uses: actions/setup-node@v6.0.0
with:
node-version: ${{ needs.release-versions.outputs.node-version }}

- name: Restore coverage folder
uses: actions/download-artifact@v6
with:
pattern: coverage-*
path: /tmp/coverage
merge-multiple: true

- name: Generate lcov report
run: |
set -o xtrace
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/api --temp-dir=/tmp/coverage/api
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/ui --temp-dir=/tmp/coverage/ui
- name: Store coverage-reports
uses: actions/upload-artifact@v4
with:
name: reports-coverage
path: /tmp/coverage_report
include-hidden-files: true

- name: Report API coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/coverage_report/api/lcov.info
working-directory: .
flags: e2e-api
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Report UI coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/coverage_report/ui/lcov.info
working-directory: .
flags: e2e
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Excellent coverage aggregation workflow, but update Codecov action version.

The new coverage reporting job successfully centralizes coverage handling by downloading artifacts, merging them with nyc, and uploading to Codecov. However, the static analysis correctly identifies that codecov/codecov-action@v3 is deprecated.

Update to the latest version to ensure compatibility with current GitHub Actions runners:

-      - name: Report API coverage
-        uses: codecov/codecov-action@v3
+      - name: Report API coverage
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/api/lcov.info
           working-directory: .
           flags: e2e-api
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

-      - name: Report UI coverage
-        uses: codecov/codecov-action@v3
+      - name: Report UI coverage
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/ui/lcov.info
           working-directory: .
           flags: e2e
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

Note: You may need to verify the API compatibility between v3 and v5, as some parameters might have changed.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
report-coverage:
name: 📊 Report Coverage
runs-on: ubuntu-24.04
needs: [release-versions, test-api-ee, test-ui-ee, test-ui-ee-watcher]
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6.0.0
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
- name: Restore coverage folder
uses: actions/download-artifact@v6
with:
pattern: coverage-*
path: /tmp/coverage
merge-multiple: true
- name: Generate lcov report
run: |
set -o xtrace
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/api --temp-dir=/tmp/coverage/api
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/ui --temp-dir=/tmp/coverage/ui
- name: Store coverage-reports
uses: actions/upload-artifact@v4
with:
name: reports-coverage
path: /tmp/coverage_report
include-hidden-files: true
- name: Report API coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/coverage_report/api/lcov.info
working-directory: .
flags: e2e-api
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Report UI coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/coverage_report/ui/lcov.info
working-directory: .
flags: e2e
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
report-coverage:
name: 📊 Report Coverage
runs-on: ubuntu-24.04
needs: [release-versions, test-api-ee, test-ui-ee, test-ui-ee-watcher]
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6.0.0
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
- name: Restore coverage folder
uses: actions/download-artifact@v6
with:
pattern: coverage-*
path: /tmp/coverage
merge-multiple: true
- name: Generate lcov report
run: |
set -o xtrace
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/api --temp-dir=/tmp/coverage/api
npx nyc report --reporter=lcovonly --report-dir=/tmp/coverage_report/ui --temp-dir=/tmp/coverage/ui
- name: Store coverage-reports
uses: actions/upload-artifact@v4
with:
name: reports-coverage
path: /tmp/coverage_report
include-hidden-files: true
- name: Report API coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: /tmp/coverage_report/api/lcov.info
working-directory: .
flags: e2e-api
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Report UI coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: /tmp/coverage_report/ui/lcov.info
working-directory: .
flags: e2e
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
🧰 Tools
🪛 actionlint (1.7.8)

623-623: 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)


633-633: 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)

🤖 Prompt for AI Agents
.github/workflows/ci.yml lines 588-640: the workflow uses the deprecated
codecov/codecov-action@v3; update the action reference to the current stable
major (e.g., codecov/codecov-action@v5) and adjust input names to match the new
API (verify token handling, files path, flags, fail_ci_if_error or equivalent,
working-directory and verbose flags) — replace the version tag, run a quick dry
CI to confirm no input name changes break the job, and update any parameter
names or behavior according to the v5 action docs.

Base automatically changed from chore/ci-improvements to develop November 11, 2025 12:15
@ggazzo ggazzo dismissed their stale review November 11, 2025 12:15

The base branch was changed.

@rodrigok rodrigok force-pushed the chore/ci-improvements-2 branch from d3d6a00 to bbdcfb6 Compare November 11, 2025 12:34
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

633-685: Excellent centralized coverage reporting job.

The new report-coverage job successfully consolidates coverage handling by:

  • Downloading all coverage artifacts (coverage-*)
  • Generating LCOV reports separately for API and UI coverage
  • Uploading to Codecov with appropriate flags (e2e-api and e2e)

This centralization aligns perfectly with the PR objective of reporting coverage after tests.

However, as previously noted, the codecov/codecov-action@v3 is deprecated (lines 668, 678).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d3d6a00 and bbdcfb6.

📒 Files selected for processing (5)
  • .github/workflows/ci-test-e2e.yml (5 hunks)
  • .github/workflows/ci.yml (3 hunks)
  • apps/meteor/package.json (1 hunks)
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (2 hunks)
  • docker-compose-ci.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/package.json
  • docker-compose-ci.yml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)

Applied to files:

  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • .github/workflows/ci-test-e2e.yml
🪛 actionlint (1.7.8)
.github/workflows/ci.yml

668-668: 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)


678-678: 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)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CodeQL-Build
🔇 Additional comments (6)
.github/workflows/ci-test-e2e.yml (5)

81-83: LGTM: Centralized coverage environment variables.

The introduction of COVERAGE_DIR, COVERAGE_FILE_NAME, and COVERAGE_REPORTER successfully centralizes coverage handling. The conditional logic for COVERAGE_REPORTER ensures coverage is only generated when inputs.coverage == matrix.mongodb-version.


162-166: LGTM: Unconditional coverage directory preparation.

Making the coverage directory preparation unconditional simplifies the workflow logic. The chmod 777 ensures Docker containers can write coverage files regardless of user permissions.


243-248: LGTM: UI coverage merging consolidates shard-specific coverage.

The new step merges per-test coverage files from .nyc_output into a single shard-specific JSON file. This aligns with the centralized coverage handling introduced in this PR.


266-271: LGTM: Consolidated coverage storage simplifies artifact management.

Replacing multiple per-type coverage uploads with a single consolidated step improves maintainability. The artifact naming scheme coverage-${type}-${shard} ensures proper identification downstream.


91-91: LGTM: Job name enhancement improves visibility.

Appending the coverage indicator to the job name makes it easier to identify coverage runs in the GitHub Actions UI.

apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (1)

10-10: Based on my verification, I can now generate the final response:

Ensure fileName has a default value or is validated when reporter is specified.

The create() function accepts Partial<ReportOptions[T]> options, where FileOptions defines file: string. Although the type signature suggests file is required, the Partial wrapper makes it optional at runtime. If COVERAGE_REPORTER is set but COVERAGE_FILE_NAME is not provided, fileName will be undefined, and passing { file: undefined } to reports.create() may cause unexpected behavior or silent failures in report generation.

Add a default value or validate that fileName is set when a reporter is configured:

 const dir = process.env.COVERAGE_DIR;
-const fileName = process.env.COVERAGE_FILE_NAME;
+const fileName = process.env.COVERAGE_FILE_NAME || 'coverage.json';
 const reporter = process.env.COVERAGE_REPORTER || 'lcov';

Alternatively, validate before use:

if (reporter && !fileName) {
  throw new Error('COVERAGE_FILE_NAME must be set when COVERAGE_REPORTER is specified');
}

Comment on lines 328 to 368
- name: Image ${{ matrix.service[1] || '"skipped"' }}
uses: ./.github/actions/build-docker
if: matrix.service[1] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
env:
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
with:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
arch: ${{ matrix.arch }}
service: ${{ matrix.service[1] }}
type: ${{ matrix.type }}
setup-docker: false

- name: Image ${{ matrix.service[2] || '"skipped"' }}
uses: ./.github/actions/build-docker
if: matrix.service[2] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
env:
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
with:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
arch: ${{ matrix.arch }}
service: ${{ matrix.service[2] }}
type: ${{ matrix.type }}
setup-docker: false

- name: Image ${{ matrix.service[3] || '"skipped"' }}
uses: ./.github/actions/build-docker
if: matrix.service[3] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
env:
DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
with:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
arch: ${{ matrix.arch }}
service: ${{ matrix.service[3] }}
type: ${{ matrix.type }}
setup-docker: false
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Remove duplicate build steps for matrix.service[1-3].

The workflow now contains duplicate build steps:

  • Lines 328-368: New steps for matrix.service[1], [2], and [3]
  • Lines 370-413: Existing steps for the same services

This duplication will cause each service to be built twice per matrix configuration, wasting CI resources and potentially causing race conditions or artifact conflicts.

Apply this diff to remove the duplicate steps:

-      - name: Image ${{ matrix.service[1] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[1] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[1] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-
-      - name: Image ${{ matrix.service[2] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[2] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[2] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-
-      - name: Image ${{ matrix.service[3] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[3] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[3] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-

Also applies to: 370-413

🤖 Prompt for AI Agents
.github/workflows/ci.yml lines 328-368 (and corresponding 370-413): duplicate
GitHub Actions steps for building images for matrix.service[1-3] cause each
service to be built twice. Remove one of the duplicated blocks (either the new
block at 328-368 or the existing one at 370-413) so each service build step
appears only once; ensure the remaining block keeps the correct if condition,
env and with keys unchanged and that service indexes [1],[2],[3] are present
only in that single set.

@rodrigok rodrigok force-pushed the chore/ci-improvements-2 branch from bbdcfb6 to 8e80445 Compare November 11, 2025 12:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/ci.yml (1)

328-368: Remove duplicate build steps with incorrect suffix logic.

Lines 328-368 duplicate the service builds from lines 370-413. Additionally, the simplified DOCKER_TAG_SUFFIX logic in the new block (lines 332, 346, 360) is incorrect—it applies -cov suffix for any coverage build, while the correct logic (lines 375, 390, 405) restricts it to release/develop contexts.

Remove the entire duplicated block (lines 328-368) and keep only lines 370-413 with the correct conditional logic:

-      - name: Image ${{ matrix.service[1] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[1] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[1] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-
-      - name: Image ${{ matrix.service[2] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[2] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[2] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-
-      - name: Image ${{ matrix.service[3] || '"skipped"' }}
-        uses: ./.github/actions/build-docker
-        if: matrix.service[3] && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]'
-        env:
-          DOCKER_TAG_SUFFIX_ROCKETCHAT: ${{ matrix.type == 'coverage' && '-cov' || '' }}
-        with:
-          CR_USER: ${{ secrets.CR_USER }}
-          CR_PAT: ${{ secrets.CR_PAT }}
-          deno-version: ${{ needs.release-versions.outputs.deno-version }}
-          arch: ${{ matrix.arch }}
-          service: ${{ matrix.service[3] }}
-          type: ${{ matrix.type }}
-          setup-docker: false
-
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bbdcfb6 and 8e80445.

📒 Files selected for processing (5)
  • .github/workflows/ci-test-e2e.yml (5 hunks)
  • .github/workflows/ci.yml (2 hunks)
  • apps/meteor/package.json (1 hunks)
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js (2 hunks)
  • docker-compose-ci.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/meteor/package.json
  • apps/meteor/packages/rocketchat-coverage/plugin/compile-version.js
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)

Applied to files:

  • .github/workflows/ci-test-e2e.yml
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • .github/workflows/ci-test-e2e.yml
🪛 actionlint (1.7.8)
.github/workflows/ci.yml

668-668: 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)


678-678: 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)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CodeQL-Build
🔇 Additional comments (6)
docker-compose-ci.yml (1)

4-4: LGTM!

The volume mapping and environment variable changes correctly implement dynamic coverage directory handling with sensible defaults. This properly supports the centralized coverage workflow.

Also applies to: 26-26

.github/workflows/ci-test-e2e.yml (5)

81-83: LGTM!

The new environment variables properly centralize coverage configuration with per-shard organization and conditional reporter setup.


91-91: LGTM!

The updated job name template clearly indicates when coverage is being collected, improving workflow visibility.


161-166: LGTM!

The coverage directory initialization properly creates the path and sets permissions for container write access.


243-248: LGTM!

The coverage merge step correctly consolidates per-test UI coverage using nyc and conditions execution appropriately.


266-271: LGTM!

The artifact storage properly names coverage artifacts per shard and type, enabling correct collection in the report-coverage job.

Comment on lines +213 to 214
ls -la $COVERAGE_DIR
exit $s
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix undefined variable in exit statement.

Line 214 attempts to exit with an undefined $s variable, causing unpredictable behavior. The variable is never defined in the script.

Capture the test exit status before the stop command and use it properly, or remove the exit statement if the step should pass:

           npm run testapi
+          TEST_STATUS=$?

           docker compose -f ../../docker-compose-ci.yml stop

           ls -la $COVERAGE_DIR
-          exit $s
+          exit $TEST_STATUS

Alternatively, if the step should always succeed after test completion:

           npm run testapi

           docker compose -f ../../docker-compose-ci.yml stop

           ls -la $COVERAGE_DIR || true
-          exit $s

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/ci-test-e2e.yml around lines 213 to 214, the script calls
"exit $s" but $s is never defined; capture the test step exit status into a
variable immediately after the test command (e.g., s=$? or similar) before any
subsequent commands that might change $?, then use that variable in the exit
statement (exit $s), or if the step should always succeed simply remove the exit
statement so the job does not fail.

include-hidden-files: true

- name: Report API coverage
uses: codecov/codecov-action@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Update deprecated Codecov action to v5.

The Codecov action v3 is deprecated and failing static analysis checks. Update to the latest v5 release:

      - name: Report API coverage
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/api/lcov.info
           working-directory: .
           flags: e2e-api
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

       - name: Report UI coverage
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/ui/lcov.info
           working-directory: .
           flags: e2e
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

Verify that input parameters (fail_ci_if_error, files, working-directory, flags, verbose, token) remain compatible with v5 API.

Also applies to: 678-678


I'll verify the key claims in the review comment about the Codecov action deprecation and version compatibility.





---

🏁 Script executed:

```shell
#!/bin/bash
# Verify the exact content at lines 668 and 678 in the CI workflow
find . -name "ci.yml" -path "*/.github/workflows/*" -type f | head -1 | xargs -I {} sed -n '665,682p' {}

Length of output: 539


🌐 Web query:

codecov/codecov-action v5 release notes breaking changes

💡 Result:

Key v5 breaking / changed items (from the official release notes):

  • Action now uses the Codecov Wrapper (encapsulates the CLI) — migration recommended to @v5. [1]
  • Deprecated/renamed inputs:
    • file → files (file deprecated). [1]
    • plugin → plugins (plugin deprecated). [1]
  • New inputs added: binary, gcov_args, gcov_executable, gcov_ignore, gcov_include, report_type, skip_validation, swift_project. [1]
  • Token/auth behavior: v5 coincides with the opt‑out global upload token feature for public repos (tokenless uploads behavior changed; see Codecov docs). OIDC is supported via use_oidc (id-token write permission required). [1][2]

References:
[1] codecov/codecov-action (v5 release notes) — GitHub.
[2] Codecov Action listing (Marketplace) — GitHub Marketplace.


🌐 Web query:

codecov-action v3 deprecation status

💡 Result:

Short answer: v3 is effectively deprecated/obsolete — Codecov has moved to newer actions (v4 uses the Codecov CLI; the repo/marketplace recommend using v5 or v4) and v3 (and earlier) will not receive the new CLI features/updates. Upgrade your workflows to v4/v5. (github.com)

Citations:


Update deprecated Codecov action from v3 to v5.

The Codecov action v3 is effectively deprecated; Codecov recommends upgrading to v4 or v5. The parameters you're using (fail_ci_if_error, files, working-directory, flags, verbose, token) remain compatible with v5, as the workflow already uses the files parameter—the correct naming for v5.

      - name: Report API coverage
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/api/lcov.info
           working-directory: .
           flags: e2e-api
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

       - name: Report UI coverage
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v5
         with:
           fail_ci_if_error: true
           files: /tmp/coverage_report/ui/lcov.info
           working-directory: .
           flags: e2e
           verbose: true
           token: ${{ secrets.CODECOV_TOKEN }}

Also applies to: 678-678

🧰 Tools
🪛 actionlint (1.7.8)

668-668: 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)

🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 668 and 678: the workflow uses the
deprecated codecov/codecov-action@v3; update both occurrences to
codecov/codecov-action@v5 (or @v4 if preferred) keeping the existing parameters
(fail_ci_if_error, files, working-directory, flags, verbose, token) unchanged
since they are compatible with v5; ensure the action version string is replaced
and run a quick workflow lint/validate to confirm no further syntax changes are
required.

@rodrigok rodrigok force-pushed the chore/ci-improvements-2 branch from 8e80445 to 55ff3dd Compare November 11, 2025 12:50
@rodrigok rodrigok force-pushed the chore/ci-improvements-2 branch from 55ff3dd to 4ba7db6 Compare November 11, 2025 13:05
@ggazzo ggazzo added this to the 7.13.0 milestone Nov 11, 2025
@ggazzo ggazzo merged commit cbd8995 into develop Nov 11, 2025
85 of 87 checks passed
@ggazzo ggazzo deleted the chore/ci-improvements-2 branch November 11, 2025 14:14
@coderabbitai coderabbitai bot mentioned this pull request Jan 12, 2026
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.

3 participants