Skip to content

Make transformers-tests job conditional on files changed #1197

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

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

dbarbuzzi
Copy link
Collaborator

@dbarbuzzi dbarbuzzi commented Feb 26, 2025

SUMMARY:
Make transformers-tests job conditional on files changed by way of using the tj-actions/changed-files@v45 action to check which files changed (ignoring files/folders based on a separate trial: #1194).

TEST PLAN:
Verify this PR:

  1. Correctly results in skipping the transformers-tests job
  2. Allows merging with the skipped job

@dbarbuzzi dbarbuzzi added the ready When a PR is ready for review label Feb 26, 2025
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Signed-off-by: Domenic Barbuzzi <[email protected]>
@dbarbuzzi
Copy link
Collaborator Author

@dsikka If this PR's current state works as expected, before merging, I want to make one change to how files are matched (change below). The change here is to include the test-check-transformers.yaml workflow file specifically, as any changes to this workflow should result in it being executed. As with other testing for this PR, I have tested the below changes in an external repo. It seems using the ! prefix does not work the same way with files_ignored which demands the switch to the files input approach instead.

         uses: tj-actions/changed-files@v45
         with:
-          files_ignore: |
-            examples/**
-            tests/e2e/**
-            tests/lmeval/**
-            tests/examples/**
-            **/*.md
-            .github/workflows/*
+          files: |
+            **
+            !examples/**
+            !tests/e2e/**
+            !tests/lmeval/**
+            !tests/examples/**
+            !**/*.md
+            !.github/**
+            .github/workflows/test-check-transformers.yaml

kylesayrs
kylesayrs previously approved these changes Feb 26, 2025
dsikka
dsikka previously approved these changes Feb 26, 2025
@dbarbuzzi dbarbuzzi dismissed stale reviews from dsikka and kylesayrs via bc2dd9f February 26, 2025 19:08
@dsikka dsikka enabled auto-merge (squash) February 26, 2025 19:10
@dsikka dsikka requested a review from kylesayrs February 26, 2025 19:12
@dsikka dsikka disabled auto-merge February 26, 2025 20:37
@dsikka dsikka merged commit 29ddedb into main Feb 26, 2025
8 checks passed
@dsikka dsikka deleted the exclude-some-changes branch February 26, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready When a PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants