Skip to content

Conversation

@priyanshu6238
Copy link
Contributor

@priyanshu6238 priyanshu6238 commented Feb 6, 2026

Summary by CodeRabbit

  • Chores

    • CI now runs E2E tests across a 5-part shard matrix with fail-fast disabled; shard IDs appear in run names and are exposed as runtime variables.
    • Added a runtime dependency to support test splitting.
  • Tests

    • Test runner now selects spec groups per shard at runtime.
    • E2E tests removed fixed waits and use visibility/timeouts for more reliable synchronization.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds 5-way Cypress test sharding to CI via a matrix.shard dimension [0-4], exposes SPLIT=5 and SPLIT_INDEX=matrix.shard, adds cypress-split dependency, updates Cypress config to select one of five spec groups at runtime, and tightens UI assertions to remove fixed waits. (36 words)

Changes

Cohort / File(s) Summary
CI workflow
/.github/workflows/continuous-integration.yml
Adds matrix.shard: [0,1,2,3,4], sets strategy.fail-fast: false, updates Cypress step name to include shard (Cypress run (shard ${ matrix.shard }/5)), and injects env SPLIT=5 and SPLIT_INDEX=${{ matrix.shard }}.
Cypress config (runtime spec selection)
cypress.config.ts.example
Adds specGroups with 5 partitions and runtime logic: when SPLIT and a valid SPLIT_INDEX are present, override config.specPattern to the corresponding group (runtime selection replacing prior plugin-based splitting).
Dependencies
package.json
Adds runtime dependency cypress-split (\cypress-split`: "^1.24.28"`).
Cypress tests
cypress/e2e/flow/FlowEditor.spec.ts
Removes fixed waits and replaces them with visibility checks and timeout-enhanced assertions (e.g., should('be.visible') before typing and cy.get(..., { timeout: 20000 }).should('contain', flowName)), reducing reliance on arbitrary waits.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions Workflow
  participant Runner as Job Runner (shard N)
  participant Cypress as Cypress Test Runner
  participant Config as Runtime Spec Selector

  GH->>Runner: start job (matrix.shard = N, env SPLIT=5, SPLIT_INDEX=N)
  Runner->>Cypress: invoke Cypress (step name includes shard N/5)
  Cypress->>Config: read SPLIT and SPLIT_INDEX
  Config->>Cypress: return selected spec group N
  Cypress->>Runner: run assigned specs and report results
  Runner->>GH: upload job outcome
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇
Five small hops across the green,
I swap long waits for signals keen.
Each shard a nibble, neat and bright,
I test in pieces through the night. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ 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 'Actions Matrix +split' directly relates to the main change—adding CI matrix sharding with split configuration across 5 parallel runners in the workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cypress_test

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.

@priyanshu6238 priyanshu6238 changed the title fix: cypress Actions Matrix +split Feb 6, 2026
Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/continuous-integration.yml (1)

27-31: ⚠️ Potential issue | 🟠 Major

Add fail-fast: false to prevent early cancellation of other shards.

GitHub Actions matrix strategy defaults fail-fast to true, meaning if one shard's tests fail, all other running shards are cancelled immediately. For test sharding, you typically want all shards to complete so you can see the full picture of failures across all shards.

🔧 Proposed fix
     strategy:
+      fail-fast: false
       matrix: # build matrix for the job
         elixir: [1.18.3-otp-27]
         otp: [27.3.3]
         shard: [0, 1, 2, 3, 4]
🤖 Fix all issues with AI agents
In `@package.json`:
- Line 10: The package.json currently references a non-existent cypress-split
version; update the "cypress-split" entry from "^1.24.28" to a valid range such
as "^1.24.25" (or "*" if you prefer to allow future patches) and move both
"cypress" and "cypress-split" entries out of "dependencies" into
"devDependencies" (consistent with "prettier") so test tooling is declared as
dev-only; ensure you remove the originals from dependencies and add them under
devDependencies with the corrected version specifier.
🧹 Nitpick comments (1)
cypress.config.ts.example (1)

25-28: Minor indentation inconsistency on Line 27.

Line 27 uses 8 spaces of indentation while the surrounding lines (26, 28) use 6 spaces. This is cosmetic but worth fixing for consistency.

🔧 Proposed fix
     setupNodeEvents(on, config) {
       // return require('./cypress/plugins/index.js')(on, config);
-        cypressSplit(on, config)
+      cypressSplit(on, config)
       return config;
     },

"author": "Kurund Jalmi <kurund.jalmi@webaccessglobal.com>",
"dependencies": {
"cypress": "13.6.2",
"cypress-split": "^1.24.28",
Copy link

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

🏁 Script executed:

cat -n package.json

Repository: glific/cypress-testing

Length of output: 706


🌐 Web query:

cypress-split npm package latest version 2025 2026

💡 Result:

As of the most recently indexed sources (Jan–Feb 2026), the latest published version of cypress-split on npm is 1.24.25. [1]

Note: npm’s own package page was not directly accessible from this environment (403), and an older cached snapshot showed 1.24.21, so 1.24.25 is the best “latest” confirmation available here. [2]

Sources: [1] [2]


cypress-split version 1.24.28 does not exist on npm; the latest published version is 1.24.25. Update the version specifier to ^1.24.25 or use * to allow future patches.

Additionally, cypress-split should be in devDependencies since it's test tooling, matching where prettier is placed. Move both cypress and cypress-split to devDependencies for consistency.

🤖 Prompt for AI Agents
In `@package.json` at line 10, The package.json currently references a
non-existent cypress-split version; update the "cypress-split" entry from
"^1.24.28" to a valid range such as "^1.24.25" (or "*" if you prefer to allow
future patches) and move both "cypress" and "cypress-split" entries out of
"dependencies" into "devDependencies" (consistent with "prettier") so test
tooling is declared as dev-only; ensure you remove the originals from
dependencies and add them under devDependencies with the corrected version
specifier.

Copy link

@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

🤖 Fix all issues with AI agents
In `@cypress.config.ts.example`:
- Around line 26-82: The example uses an unsupported specGroups option in the
cypressSplit call; update the cypressSplit(...) usage to remove the specGroups
argument and instead implement one of the supported approaches: supply an
explicit spec list via environment (SPEC or --env spec="..."), use SKIP_SPEC to
exclude files, or pass an adjustTheSpecs callback function (e.g.,
cypressSplit(on, config, adjustTheSpecs)) that returns the partitioned specs;
locate the cypressSplit invocation in the file and replace the specGroups array
with one of these supported mechanisms and update any documentation comments
accordingly.
- Around line 26-82: The config uses cypressSplit and a non-existent specGroups
option causing runtime failure; add cypress-split to devDependencies in
package.json and remove/replace the specGroups usage in the
cypress.config.ts.example (look for cypressSplit(...) and the specGroups array)
with the cypress-split documented env-var approach (use SPLIT and SPLIT_INDEX to
select spec lists) or confirm/replace with your team's custom fork that supports
specGroups; ensure the list of spec paths is moved into a script or logic that
reads SPLIT/SPLIT_INDEX to produce the per-worker spec list.

@priyanshu6238 priyanshu6238 self-assigned this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant