forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI sanity check test for env vars (pytorch#120519)
Make a test that fails on purpose to trigger retries. Check the opposite of success (that env vars exist) It's bit hacky because I want it to fail on the normal flow in order to trigger reruns but I don't want to expose the failures to users since it's confusing. Pull Request resolved: pytorch#120519 Approved by: https://github.com/huydhn
- Loading branch information
1 parent
75bb049
commit f43b9c5
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Owner(s): ["module: ci"] | ||
# Sanity check for CI setup in GHA. This file is expected to fail so it can trigger reruns | ||
|
||
import os | ||
|
||
from torch.testing._internal.common_utils import run_tests, TestCase | ||
|
||
|
||
class TestCISanityCheck(TestCase): | ||
def test_env_vars_exist(self): | ||
# This check should fail and trigger reruns. If it passes, something is wrong | ||
self.assertTrue(os.environ.get("CI") is None) | ||
|
||
|
||
if __name__ == "__main__": | ||
run_tests() |