Skip to content

Skip running tests in build step#2651

Merged
jaydeluca merged 1 commit intoopen-telemetry:mainfrom
laurit:skip-tests
Feb 24, 2026
Merged

Skip running tests in build step#2651
jaydeluca merged 1 commit intoopen-telemetry:mainfrom
laurit:skip-tests

Conversation

@laurit
Copy link
Copy Markdown
Contributor

@laurit laurit commented Feb 24, 2026

Tests are already run in separate test steps. -x test won't skip jvm test suites that are added with dependsOn to check.

Copilot AI review requested due to automatic review settings February 24, 2026 12:31
@laurit laurit requested a review from a team as a code owner February 24, 2026 12:31
Copy link
Copy Markdown
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 addresses the issue where -x test doesn't properly skip JvmTestSuites that are added to the check task with dependsOn. It introduces a property-based approach to disable all Test tasks consistently across the build.

Changes:

  • Added a skipTests property handler in root build.gradle.kts that disables all Test tasks when set to true
  • Updated the build-common.yml workflow to use -PskipTests=true instead of -x test

Reviewed changes

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

File Description
build.gradle.kts Added property-based mechanism to disable all Test tasks including JvmTestSuites when skipTests=true is passed
.github/workflows/build-common.yml Updated build step to use -PskipTests=true instead of -x test to properly skip all test tasks


- name: Build
run: ./gradlew build -x spotlessCheck -x test ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
run: ./gradlew build -x spotlessCheck -PskipTests=true ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The copilot-setup-steps.yml workflow also uses -x test and should be updated to use -PskipTests=true for consistency. This ensures that all test suites (including JvmTestSuites added with dependsOn to check) are properly skipped across all workflows.

Copilot uses AI. Check for mistakes.
@jaydeluca jaydeluca added this pull request to the merge queue Feb 24, 2026
Merged via the queue into open-telemetry:main with commit f68ac73 Feb 24, 2026
25 checks passed
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