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

[Tests] make test steps dependent on certain things and general cleanup of the workflows #7026

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

sayakpaul
Copy link
Member

What does this PR do?

We can make our test suite conditional on certain things. For example, if "code quality" doesn't pass, we shouldn't really execute the rest of the testing suite. Similarly, "torch dependency" tests shouldn't run when a change is made to "benchmarks" folder, for example.

Rigorous review is appreciated.

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu February 19, 2024 10:47
run_fast_tests:
needs: [check_code_quality, check_repository_consistency]
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of separately running the code quality and consistency tests we run them here and make them as requirements.

run_fast_tests:
needs: [check_code_quality, check_repository_consistency]
Copy link
Member Author

Choose a reason for hiding this comment

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

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@@ -4,6 +4,9 @@ on:
pull_request:
branches:
- main
paths:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why add paths here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as #7026 (comment).

@@ -4,6 +4,14 @@ on:
pull_request:
branches:
- main
paths:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why include paths?

Copy link
Member Author

Choose a reason for hiding this comment

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

So that we don't trigger this workflow for changes made to "docs" folder for example.

Copy link
Collaborator

@DN6 DN6 left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏽

@sayakpaul
Copy link
Member Author

@yiyixuxu a gentle ping here as the PR will significantly speed up the CI.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@sayakpaul sayakpaul merged commit fa9bc02 into main Feb 28, 2024
10 checks passed
@sayakpaul sayakpaul deleted the refactor-tests-workflow branch February 28, 2024 02:56
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.

4 participants