Skip some slow tests for doctesting in PRs (Circle)CI (#24753)
* fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
1
utils/slow_documentation_tests.txt
Normal file
1
utils/slow_documentation_tests.txt
Normal file
@@ -0,0 +1 @@
|
||||
docs/source/en/task_summary.md
|
||||
@@ -310,10 +310,17 @@ def get_doctest_files(diff_with_last_commit=False):
|
||||
print(f"Parent commit: {commit}")
|
||||
test_files_to_run = get_diff_for_doctesting(repo, repo.head.commit, parent_commits)
|
||||
|
||||
# This is the full list of doctest tests
|
||||
with open("utils/documentation_tests.txt") as fp:
|
||||
documentation_tests = set(fp.read().strip().split("\n"))
|
||||
# Not to run slow doctest tests
|
||||
with open("utils/slow_documentation_tests.txt") as fp:
|
||||
slow_documentation_tests = set(fp.read().strip().split("\n"))
|
||||
|
||||
# So far we don't have 100% coverage for doctest. This line will be removed once we achieve 100%.
|
||||
test_files_to_run = [x for x in test_files_to_run if x in documentation_tests]
|
||||
test_files_to_run = [
|
||||
x for x in test_files_to_run if x in documentation_tests and x not in slow_documentation_tests
|
||||
]
|
||||
# Make sure we did not end up with a test file that was removed
|
||||
test_files_to_run = [f for f in test_files_to_run if (PATH_TO_REPO / f).exists()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user