Skip to content

CI: skip build/test workflows on docs-only pull requests - #8167

Open
mohanchen wants to merge 1 commit into
deepmodeling:developfrom
mohanchen:ci-skip-docs-builds
Open

mohanchen wants to merge 1 commit into
deepmodeling:developfrom
mohanchen:ci-skip-docs-builds

Conversation

@mohanchen

Copy link
Copy Markdown
Collaborator

Add paths-ignore to the pull_request triggers of the six heavy build and test workflows (CMake builds, Makefile build, integration/unit tests, CUDA build+test, PyTest, ASE plugin test). Pull requests that only touch docs/**, Markdown files, or .coderabbit.yaml no longer spend runner time on compilation and physics tests that cannot be affected by such changes. Motivated by docs-only PRs such as #8148, which triggered 14 full build/test runs.

Scope notes:

  • push triggers (including the develop safety-net runs) are unchanged.
  • agent_governance.yml is deliberately untouched: AGENTS.md changes are its primary input and must keep running.
  • Workflow file changes themselves are not ignored, so CI changes still trigger CI.

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

Linked Issue

Fix #

Unit Tests and/or Case Tests for my changes

  • Commands run:
  • Result summary:
  • Checks not run, with reason:

What's changed?

  • Example: brief summary of the user-visible or developer-facing change.

Governance Notes

  • INPUT/docs changes:
  • Core module impact:
  • Exceptions requested:

Add paths-ignore to the pull_request triggers of the six heavy build
and test workflows (CMake builds, Makefile build, integration/unit
tests, CUDA build+test, PyTest, ASE plugin test). Pull requests that
only touch docs/**, Markdown files, or .coderabbit.yaml no longer
spend runner time on compilation and physics tests that cannot be
affected by such changes. Motivated by docs-only PRs such as deepmodeling#8148,
which triggered 14 full build/test runs.

Scope notes:
- push triggers (including the develop safety-net runs) are unchanged.
- agent_governance.yml is deliberately untouched: AGENTS.md changes
  are its primary input and must keep running.
- Workflow file changes themselves are not ignored, so CI changes
  still trigger CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mohanchen mohanchen added the Standards Coding standards and governance rules label Oct 17, 2026
@mohanchen
mohanchen requested a review from Critsium-xy October 17, 2026 13:10
@mohanchen mohanchen added Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Tests/Examples Issues/PR related to unit tests and integrate tests labels Oct 17, 2026

@AsTonyshment AsTonyshment left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

With the current branch protection, a documentation-only PR would probably skip the workflow but still require Test to pass, leaving it waiting for a status and blocking normal merging (we'll see something like "Expected / Waiting for status to be reported").

See GitHub's "Handling skipped but required checks": https://docs.github.com/en/pull-requests/how-tos/merge-and-close-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

@Critsium-xy

Copy link
Copy Markdown
Collaborator

Branch protection on develop requires 10 checks produced by three of the workflows touched here:

  • build_test_cmake.yml: 8 checks (Build with GNU toolchain, Build with Intel toolchain, Build extra components with GNU/Intel toolchain, Build with CUDA support, Build without ELPA, Build without LCAO, Build without LCAO and MPI)
  • build_test_makefile.yml: Build with Makefile & Intel compilers
  • test.yml: Test

A workflow skipped by paths-ignore reports no status, so on a docs-only PR these checks stay "Expected — Waiting for status to be reported" and non-admins cannot merge. cuda.yml, pytest.yml, and ase_plugin_test.yml produce no required checks and are safe to filter as written.

Note: moving the skip to a job-level if: works for Test, but the cmake/makefile jobs are named ${{ matrix.name }}. A matrix job skipped at job level is likely not expanded, so the required check names would still be missing. Worth verifying on a fork.

Possible fixes:

  1. Narrow the scope (simplest): keep paths-ignore only in cuda.yml, pytest.yml, and ase_plugin_test.yml. This is mergeable now and still saves the GPU runner.
  2. Aggregate gate job: add a changes job (e.g. dorny/paths-filter) that the heavy jobs need and are conditioned on, plus a final if: always() job that checks their results. Then switch branch protection to require only the gate job. This needs an admin to change the protection rules in step with the workflows.
  3. Step-level skip: keep the jobs running so the correct check names report, and skip only the build/test steps. This needs no protection change, but each job still pulls its container image, and Test still takes a self-hosted runner, so the savings are smaller.

Minor: **/*.md also matches python/pyabacus/README.md and interfaces/ASE_interface/README.md, which are referenced as readme in their pyproject.toml. A PR that only deletes or renames one of them would skip the pip-install test that would catch the breakage.

This branch has not been deployed

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

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Standards Coding standards and governance rules Tests/Examples Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants