Skip to content

Commit

Permalink
fully list tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed May 1, 2024
1 parent 18f8ac2 commit eb77eed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def to_dict(self):
expanded_tests.append(test)
elif test == "tests/models":
expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
for x in os.listdir(test):
expanded_tests.extend([os.path.join(test, x,y) for y in os.listdir(os.path.join(test, x)) ])
elif test == "tests/pipelines":
expanded_tests.extend([os.path.join(test, x) for x in os.listdir(test)])
else:
Expand All @@ -165,7 +167,7 @@ def to_dict(self):
command = f'echo {tests} | tr " " "\\n" >> tests.txt'
steps.append({"run": {"name": "Get tests", "command": command}})

command = 'TESTS=$(circleci tests split $(find $(cat tests.txt) -type f) --split-by=timings) && echo $TESTS > splitted_tests.txt'
command = 'TESTS=$(circleci tests split tests.txt) --split-by=timings) && echo $TESTS > splitted_tests.txt'
steps.append({"run": {"name": "Split tests", "command": command}})

steps.append({"store_artifacts": {"path": "~/transformers/tests.txt"}})
Expand Down

0 comments on commit eb77eed

Please sign in to comment.