Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@xerial
Copy link
Owner

@xerial xerial commented Jul 19, 2025

Summary

  • Implements conditional CI execution using dorny/paths-filter
  • Skips expensive test runs for documentation-only changes
  • Maintains required status checks compliance

Details

This PR modifies the CI workflow to intelligently skip tests when changes don't affect source code or build configuration. The implementation:

  1. Uses dorny/paths-filter to detect if any code-related files have changed

  2. Runs actual tests only when changes are detected in:

    • Scala/Java source files
    • Build files (*.sbt, build.properties)
    • Native libraries (*.so, *.dll)
    • Resources
    • GitHub workflow files
  3. Provides skip jobs that satisfy required status checks when no code changes are detected

Benefits

  • Reduces CI time and resource usage for documentation changes
  • Faster feedback for contributors making non-code changes
  • Still maintains code quality by running all tests when needed

Test plan

  • Created test documentation file to verify skip behavior
  • PR should show all required checks passing with skip messages
  • Modify a source file in another commit to verify tests run normally

🤖 Generated with Claude Code

- Add dorny/paths-filter to detect code changes
- Run actual tests only when code/build files change
- Add skip jobs to satisfy required status checks
- Reduces CI time for documentation-only changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the doc label Jul 19, 2025
xerial added 5 commits July 19, 2025 09:00
- Ensures code format check runs when scalafmt config changes
- Important for maintaining consistent code formatting rules
- Includes sbt and sbt.bat in path filters
- Ensures tests run when build scripts are modified
- No longer needed for PR demonstration
- PR description already explains the changes
- Remove unnecessary skip jobs for JDK tests
- Keep only code_format_skip for required status check
- Remove code_format_skip job
- Simplify workflow to only run tests when code changes detected
@xerial xerial merged commit 066b9af into master Jul 19, 2025
8 checks passed
@xerial xerial deleted the skip-ci-for-non-code-changes branch July 19, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.