Skip to content

ci: Run workflows only if changes involves them#3680

Open
FBruzzesi wants to merge 3 commits into
mainfrom
ci/run-less
Open

ci: Run workflows only if changes involves them#3680
FBruzzesi wants to merge 3 commits into
mainfrom
ci/run-less

Conversation

@FBruzzesi

@FBruzzesi FBruzzesi commented Jun 11, 2026

Copy link
Copy Markdown
Member

Description

Followup on #3609 (comment)

Trying to follow the same polars philosophy:

Only run checks when they need to be run


Difference between src/** and **.py case is to distinguish between:

  • Something changed in the source code that we ship, then we should run all downstream deps
  • Any python file changes (e.g. tpch, test-plugin, etc), then our test suite should run

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

@FBruzzesi FBruzzesi added ci github_actions Pull requests that update GitHub Actions code labels Jun 11, 2026
@FBruzzesi FBruzzesi requested a review from dangotbanned June 11, 2026 11:30
Comment thread .github/workflows/extremes.yml
@dangotbanned

Copy link
Copy Markdown
Member

@FBruzzesi If you wanna move this out of draft I'll review it.

It seems ready to me, but I don't wanna prioritize it over others that you've marked as ready 🙂

@FBruzzesi

Copy link
Copy Markdown
Member Author

@dangotbanned my only concern is about the repo ruleset for merging. Since some jobs do not run, they don't show up as succeeded, therefore merging is not available. I will try to take a look at the github docs this week

@dangotbanned

Copy link
Copy Markdown
Member

Ah I see, yeah I think changing those rules is above my pay grade sadly 😅

@FBruzzesi FBruzzesi marked this pull request as ready for review June 23, 2026 09:36
@FBruzzesi

Copy link
Copy Markdown
Member Author

@dangotbanned according to https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-jobs-with-conditions

A job that is skipped will report its status as "Success". It will not prevent a pull request from merging, even if it is a required check.


I think that if you/someone approves it, then it should act as any other PR

@dangotbanned dangotbanned self-requested a review June 23, 2026 11:22

@dangotbanned dangotbanned left a comment

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.

Comment on lines +5 to +6
paths:
- "**.py"

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.

Suggested change
paths:
- "**.py"
paths:
- "**.py"
- .github/workflows/check_tpch_queries.yml

Comment on lines +5 to +6
paths:
- src/**

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.

Suggested change
paths:
- src/**
paths:
- src/**
- .github/workflows/downstream_tests.yml

on:
pull_request:
paths:
- "**.py"

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.

Suggested change
- "**.py"
- "**.py"
- .github/workflows/extremes.yml

Comment on lines +6 to +7
- src/**
- tests/**

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.

Suggested change
- src/**
- tests/**
- src/**
- tests/**
- .github/workflows/pytest-fireducks.yml

Also we might be able to refine more with changes to pandas/dependencies, perhaps?

- src/narwhals/_expression_parsing.py
- src/narwhals/_ibis/**
- src/narwhals/_sql/**
- tests/**

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.

Suggested change
- tests/**
- tests/**
- .github/workflows/pytest-ibis.yml

Note

I keep forgetting to mention, but do we still need this job?

paths:
- src/narwhals/_expression_parsing.py
- src/narwhals/_pandas_like/**
- tests/**

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.

Suggested change
- tests/**
- tests/**
- .github/workflows/pytest-modin.yml

on:
pull_request:
paths:
- "**.py"

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.

Suggested change
- "**.py"
- "**.py"
- .github/workflows/random_ci_pytest.yml

on:
pull_request:
paths:
- "**.py"

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.

Suggested change
- "**.py"
- "**.py"
- .github/workflows/pytest.yml

on:
pull_request:
paths:
- "**.py"

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.

Finally one that is more interesting!

It is pretty common for typing issues to arise on version bumps, when we've done nothing internally

Suggested change
- "**.py"
- "**.py"
- .github/workflows/typing.yml
- pyproject.toml
- uv.lock

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

Labels

ci github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants