From 655f72a6896c0533b1bdee519ed65a059c2425ac Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Thu, 29 Sep 2022 09:36:42 -0400 Subject: [PATCH] Fix test fetching for examples (#19237) * Fix test fetching for examples * Fake example modif * Debug statements * Typo * You need to persist the file... * Revert change in example * Remove debug statements --- .circleci/config.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0143cdeb77..06c621621f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,11 +83,21 @@ jobs: else touch test_preparation/test_list.txt fi + - run: python utils/tests_fetcher.py --filters tests examples | tee examples_tests_fetched_summary.txt + - store_artifacts: + path: ~/transformers/examples_tests_fetched_summary.txt + - run: | + if [ -f test_list.txt ]; then + mv test_list.txt test_preparation/examples_test_list.txt + else + touch test_preparation/examples_test_list.txt + fi - persist_to_workspace: root: test_preparation/ paths: test_list.txt + examples_test_list.txt # To run all tests for the nightly build fetch_all_tests: @@ -99,6 +109,7 @@ jobs: - run: | mkdir test_preparation echo "tests" > test_preparation/test_list.txt + echo "tests" > test_preparation/examples_test_list.txt - persist_to_workspace: root: test_preparation/ @@ -426,7 +437,7 @@ jobs: - attach_workspace: at: ~/transformers/test_preparation - run: | - if [ ! -s test_preparation/test_list.txt ]; then + if [ ! -s test_preparation/examples_test_list.txt ]; then echo "No tests to run, exiting early!" circleci-agent step halt fi @@ -463,7 +474,7 @@ jobs: - attach_workspace: at: ~/transformers/test_preparation - run: | - if [ ! -s test_preparation/test_list.txt ]; then + if [ ! -s test_preparation/examples_test_list.txt ]; then echo "No tests to run, exiting early!" circleci-agent step halt fi @@ -499,7 +510,7 @@ jobs: - attach_workspace: at: ~/transformers/test_preparation - run: | - if [ ! -s test_preparation/test_list.txt ]; then + if [ ! -s test_preparation/examples_test_list.txt ]; then echo "No tests to run, exiting early!" circleci-agent step halt fi