Skip to content

Conversation

@maor-rozenfeld
Copy link
Contributor

Resolves OPS-3429.

This PR implements optimizations to improve test performance and reduce log noise in the CI pipeline:

Changes Made

  1. Configured Jest silent mode in CI - Reduces verbose test output in GitHub Actions
  2. Optimized worker allocation - Uses 50% of available workers in CI (vs 75% locally) to prevent resource contention
  3. Configured minimal test reporter - Uses summary-only output in CI for cleaner logs
  4. Suppressed console output in tests - Mocks console.log/info/warn/error/debug in CI environment

Expected Impact

  • Reduced log noise: Test logs will be significantly cleaner and easier to read
  • Improved performance: Better worker allocation should reduce test execution time
  • Better debugging: Failures will still show clear error messages while success is concise

Testing

These changes only affect CI environment behavior (when ). Local development test runs remain unchanged for better debugging experience.


This PR was created by AI (GitHub Copilot CLI)

@linear
Copy link

linear bot commented Jan 16, 2026

@maor-rozenfeld maor-rozenfeld marked this pull request as ready for review January 16, 2026 11:54
Copilot AI review requested due to automatic review settings January 16, 2026 11:54
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 implements optimizations to reduce test log noise and improve performance in the CI environment by configuring Jest's silent mode, optimizing worker allocation, and suppressing console output.

Changes:

  • Configured Jest to run in silent mode with minimal reporting in CI
  • Optimized worker allocation (50% in CI vs 75% locally) to prevent resource contention
  • Suppressed console output methods in CI environment to reduce log noise

Reviewed changes

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

File Description
jest.setup.js Mocks console methods in CI to suppress output
jest.preset.js Configures Jest silent mode, worker count, and minimal reporter for CI
.github/workflows/ci.yml Sets CI environment variable to enable optimizations

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

debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

Mocking console.error will suppress error messages that are critical for debugging test failures in CI. Consider preserving console.error to ensure that genuine errors are still visible in CI logs, while mocking only the informational methods (log, debug, info, warn).

Suggested change
error: jest.fn(),

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +24
reporters: process.env.CI === 'true'
? [['default', { summaryThreshold: 0 }]]
: ['default'],
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The multi-line ternary expression is split inconsistently with the opening condition. Consider moving the entire ternary to one line or restructuring for better readability: reporters: process.env.CI === 'true' ? [['default', { summaryThreshold: 0 }]] : ['default'],

Suggested change
reporters: process.env.CI === 'true'
? [['default', { summaryThreshold: 0 }]]
: ['default'],
reporters: process.env.CI === 'true' ? [['default', { summaryThreshold: 0 }]] : ['default'],

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

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