Skip to content

ci(testing): reduce e2e test parallelism in CI to fix flaky tests#3789

Merged
adrianschmidt merged 3 commits intomainfrom
fix-flaky-tests
Feb 8, 2026
Merged

ci(testing): reduce e2e test parallelism in CI to fix flaky tests#3789
adrianschmidt merged 3 commits intomainfrom
fix-flaky-tests

Conversation

@adrianschmidt
Copy link
Copy Markdown
Contributor

@adrianschmidt adrianschmidt commented Jan 20, 2026

Work around Stencil v4 e2e test parallelization issues that cause random timeouts in CI but not locally. Changes only apply when CI=true.

  • Add --disable-gpu browser arg in stencil.config.ts
  • Add --max-workers=2 in run-tests.cjs

See: stenciljs/core#6157

Summary by CodeRabbit

  • Chores
    • Detect CI environments to adjust test execution for more reliable runs.
    • Reduce parallelism and disable GPU in CI to improve test stability.
    • Improve debug behavior and add clearer logging for test runs.

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

…enabled

Adds a test runner wrapper script that automatically enables verbose
output when debug logging is enabled.

The wrapper detects ACTIONS_STEP_DEBUG, RUNNER_DEBUG, or DEBUG env vars
and adds the --verbose flag to the stencil test command.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Adds CI detection to test tooling: the test runner reduces worker parallelism and logs CI/debug state; Stencil test browser args now optionally include --disable-gpu when CI is set via a new env helper.

Changes

Cohort / File(s) Summary
CI Test Runner & Config
scripts/run-tests.cjs, stencil.config.ts
Introduce envIsSet/CI detection. scripts/run-tests.cjs adds a CI branch that pushes --max-workers=2 and logs CI/debug info; preserves existing debug handling and arg passthrough. stencil.config.ts changes testing.browserArgs from a single string to an array and conditionally appends --disable-gpu when CI is truthy. Areas to review: env truthiness logic, interaction between debug flags and CI branch, and test invocation arg composition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: reducing e2e test parallelism in CI to address flaky tests, which matches the core objectives of the PR.

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

✨ 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 fix-flaky-tests

No actionable comments were generated in the recent review. 🎉


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.

@adrianschmidt
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions
Copy link
Copy Markdown

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3789/

@adrianschmidt
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adrianschmidt
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
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

🤖 Fix all issues with AI agents
In `@scripts/run-tests.cjs`:
- Around line 20-25: Update the comment above the CI parallelism adjustment to
accurately reflect the library version or intent: change the mention of "Stencil
v4" to "Stencil v3.4.2" (or note that this is a forward-looking workaround for
potential Stencil v4 issues) so the comment matches the project context; the
change should be made in the block that checks isCI and pushes '--max-workers=2'
(see the isCI condition, args.push('--max-workers=2') and the console.log
statement) to avoid version confusion.

In `@stencil.config.ts`:
- Around line 52-57: The browserArgs spread uses a simple truthy check on
process.env.CI which is inconsistent with run-tests.cjs; change the conditional
to use the shared helper envIsSet('CI') (the same function used in
run-tests.cjs) so edge cases like '0'/'false' are handled consistently, and add
the corresponding import for envIsSet at the top of stencil.config.ts; update
the spread expression in browserArgs to use envIsSet('CI') instead of
process.env.CI.

Comment thread scripts/run-tests.cjs
Comment thread stencil.config.ts
Work around Stencil v4 e2e test parallelization issues that cause
random timeouts in CI but not locally. Changes only apply when CI=true.

- Add --disable-gpu browser arg in stencil.config.ts
- Add --max-workers=2 in run-tests.cjs

See: stenciljs/core#6157
@adrianschmidt adrianschmidt requested a review from a team as a code owner January 20, 2026 20:28
@adrianschmidt adrianschmidt force-pushed the add-verbose-test-logging branch from a77f57d to 1e23ec8 Compare February 8, 2026 19:59
Base automatically changed from add-verbose-test-logging to main February 8, 2026 20:09
@adrianschmidt adrianschmidt merged commit ff8bf84 into main Feb 8, 2026
10 checks passed
@adrianschmidt adrianschmidt deleted the fix-flaky-tests branch February 8, 2026 20:51
@lime-opensource
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 38.47.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants