Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Move file change filter definitions to a file #988

Merged
merged 1 commit into from
May 1, 2024

Conversation

aborgna-q
Copy link
Collaborator

Cleanup PR. Centralises the file filter used by dorny/paths-filter when detecting changes in a single .yml.

@aborgna-q aborgna-q requested a review from croyzor May 1, 2024 16:05
- 'hugr-py/**'
- 'pyproject.toml'
- 'specification/schema/**'
filters: .github/change-filters.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we not need to specify whether we want the rust filter or the python filter here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It computes both, an we use the one we need. It's not an expensive operation so it doesn't change much.

Copy link
Contributor

Choose a reason for hiding this comment

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

So after this PR, we'll run both ci-py and ci-rs when relevant python or rust files are changed, but we wont run either when other files change. Is that right?

Copy link
Collaborator Author

@aborgna-q aborgna-q May 1, 2024

Choose a reason for hiding this comment

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

Yes, that's the same behaviour we have already.

The other job steps check for

if: ${{ needs.changes.outputs.python == 'true' }}

or

if: ${{ needs.changes.outputs.rust == 'true' }}

to see if they should run or be skipped

@aborgna-q aborgna-q added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit fc6f17f May 1, 2024
13 checks passed
@aborgna-q aborgna-q deleted the ab/ci/file-changes-file branch May 1, 2024 16:42
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