Skip to content

GH-1188: Reduce test workflow waste#1189

Open
xborder wants to merge 2 commits into
apache:mainfrom
xborder:ci-test-workflow-phases-1-3
Open

GH-1188: Reduce test workflow waste#1189
xborder wants to merge 2 commits into
apache:mainfrom
xborder:ci-test-workflow-phases-1-3

Conversation

@xborder

@xborder xborder commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR reduces wasted GitHub Actions time in the Test workflow by removing redundant rebuilds, improving caching, and skipping integration work when it is not relevant.

What changed

  • Removed clean from ci/scripts/test.sh so the test phase reuses the classes compiled earlier in the job instead of deleting and recompiling them.
  • Narrowed the Maven/Docker cache key to POM changes, so source-only edits do not invalidate the dependency cache.
  • Enabled Maven dependency caching on the macOS and Windows test jobs.
  • Added pull-requests: read so the integration job can inspect changed files.
  • Added a WIP guard for the integration job.
  • Made the integration job run only when integration-relevant files changed.

Closes #1188

Note: The changes on this PR were highlighted and addressed with AI assistance

@github-actions

This comment has been minimized.

Comment thread .github/workflows/test.yml Outdated
@lidavidm lidavidm added the enhancement PRs that add or improve features. label Jun 15, 2026
@xborder xborder requested a review from kou June 20, 2026 09:43
@github-actions github-actions Bot added this to the 20.0.0 milestone Jun 21, 2026
Comment on lines +178 to +189
const relevant = files.some(({ filename }) =>
filename === 'compose.yaml' ||
filename === 'pom.xml' ||
filename === '.github/workflows/test.yml' ||
filename.startsWith('c/') ||
filename.startsWith('flight/') ||
filename.startsWith('format/') ||
filename.startsWith('vector/') ||
filename.startsWith('ci/scripts/') ||
filename.startsWith('testing/data/') ||
filename.endsWith('/pom.xml')
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's separate this job to another workflow and use paths: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore .

If you work on this as a separated PR, we'll be able to merge this PR sooner.

with:
path: .docker
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('compose.yaml', '**/pom.xml', '**/*.java') }}
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('compose.yaml', '**/pom.xml') }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed?
If we don't update a cache by .java change, I think that we can't reuse cache for changed .java.

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

Labels

enhancement PRs that add or improve features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Reduce CI test usage

3 participants