Skip to content

ci: implement phase 1 path-based workflow skipping#3332

Open
geoHeil wants to merge 17 commits intomainfrom
issue-3327-phase1-path-skipping
Open

ci: implement phase 1 path-based workflow skipping#3332
geoHeil wants to merge 17 commits intomainfrom
issue-3327-phase1-path-skipping

Conversation

@geoHeil
Copy link
Copy Markdown
Contributor

@geoHeil geoHeil commented Apr 20, 2026

Summary

  • add PR concurrency to the CI entry workflows
  • add simple path-based change detection before calling the reusable CI and docs workflows
  • gate the expensive checks jobs by changed paths while keeping pyproject.toml, uv.lock, and Dockerfile as CI-triggering paths

Part of #3327.

Testing

  • Ruby YAML parse for .github/workflows/ci.yml, .github/workflows/ci-docs.yml, and .github/workflows/checks.yml
  • git diff --check

Notes

  • this intentionally uses simple path-based skipping only for phase 1
  • no GitHub-hosted workflow run was executed locally
The action dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d is not allowed in docling-project/docling because all actions must be from a repository owned by docling-project, created by GitHub, or match one of the patterns: DavidAnson/markdownlint-cli2-action@v16, astral-sh/setup-uv@v5, astral-sh/setup-uv@v6, astral-sh/setup-uv@v7, codecov/codecov-action@*, codecov/codecov-action@v2, codecov/codecov-action@v5, demodrive-ai/llms-txt-action@ad720693843126e6a73910a667d0eba37c1dea4b, denoland/setup-deno@*, dependabot/*, docker/*, docker/setup-qemu-action@v3, dorny/test-reporter*, gradle/actions/*, gradle/actions/wrapper-validation@v5, jreleaser/release-action@*, madrapps/jacoco-report@v1.7.2, mikepenz/action-junit-report*, mikepenz/action-junit-report@v4, msys2/setup-msys2@v2, peter-evans/create-pull-request*, pypa/cibuildwheel@*, pypa/gh-action-pypi-publish@release/v1, redhat-actions/buildah-build@*, redhat-actions/push-to-registry@*, sigstore/gh-action-sigstore-python@v3.0.0...

we will have to modify the list of allowed CI actions

geoHeil added 4 commits April 20, 2026 20:05
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

DCO Check Passed

Thanks @geoHeil, all your commits are properly signed off. 🎉

@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 20, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

geoHeil added 2 commits April 20, 2026 21:10
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Copy link
Copy Markdown
Member

@dolfim-ibm dolfim-ibm left a comment

Choose a reason for hiding this comment

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

The new action is now whitelisted, this can be tried out with a new commit+push.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +100 to +108
needs.changes.outputs.full_matrix_override == 'true' &&
'["3.10", "3.11", "3.12", "3.13", "3.14"]'
) ||
(
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'tests:full') &&
'["3.10", "3.11", "3.12", "3.13", "3.14"]'
) ||
'["3.10"]'
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.

better keep the python versions in a variable/input, otherwise we have too many places to maintain.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in f5d2b9d: the PR workflow now defines DEFAULT_PYTHON_VERSIONS and FULL_PYTHON_VERSIONS once and passes them through changes job outputs instead of repeating the JSON matrix in the reusable workflow call.

enable-cache: true

- name: Install minimal trusted lint and typing dependencies
run: uv sync --frozen --only-group pr-fast-checks --no-install-project
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.

just checking my understanding: the checkout action above is cloning the base branch (main) so it is always using the deps in main, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is the intended behavior. Addressed in f5d2b9d by documenting it inline: pull_request_target checks out the trusted base commit for dependency installation, then fetches the PR head separately as FETCH_HEAD for diff/overlay checks only.

name: "Run PR Fast Checks"

on:
pull_request_target:
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.

should we temporary make it a PR CI action? otherwise we cannot test it before merge.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sounds like a good idea.

but somehow my permissions are not there to test drive the CI change on the branch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

could you either grant me other/more permissions or allow the CI change see also in the top level description what is not allowed right now)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ah - just saw it seems t obe whitelisted now. let me try again

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.

As a wrote, it is done already

#3332 (review)

Comment thread .github/workflows/pr-fast-checks.yml Outdated
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- ".github/workflows/pr-fast-checks.yml"
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.

We might not need any filter here, we are anyway including almost all...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 4d767f8: removed the trigger-level paths: filter from pr-fast-checks.yml. The workflow now runs for all PR target events, while .github/scripts/run_pr_fast_checks.py still performs its own changed-file targeting and exits quickly when there are no Python/notebook targets.

geoHeil added 9 commits April 21, 2026 08:42
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
@geoHeil
Copy link
Copy Markdown
Contributor Author

geoHeil commented Apr 21, 2026

Temporary normal pull_request validation for the heavy CI/docs workflows completed successfully on this PR. I removed those normal pull_request triggers again so same-repo PR branches do not produce duplicate push + pull_request CI runs. The dedicated trusted pull_request_target fast-check workflow remains enabled for PR validation.

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
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