Unverified Commit 67d32f46 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Replace `set-output` by `$GITHUB_OUTPUT` (#20547)



* remove set-output
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 9763f829
...@@ -35,7 +35,7 @@ jobs: ...@@ -35,7 +35,7 @@ jobs:
if: ${{ always() }} if: ${{ always() }}
run: | run: |
offline_runners=$(python3 -c 'fp = open("offline_runners.txt"); failed = fp.read(); fp.close(); print(failed)') offline_runners=$(python3 -c 'fp = open("offline_runners.txt"); failed = fp.read(); fp.close(); print(failed)')
echo "::set-output name=offline_runners::$offline_runners" echo "offline_runners=$offline_runners" >> $GITHUB_OUTPUT
send_results: send_results:
name: Send results to webhook name: Send results to webhook
......
...@@ -83,7 +83,7 @@ jobs: ...@@ -83,7 +83,7 @@ jobs:
name: Identify models to test name: Identify models to test
working-directory: /transformers/tests working-directory: /transformers/tests
run: | run: |
echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
- name: NVIDIA-SMI - name: NVIDIA-SMI
run: | run: |
......
...@@ -92,7 +92,7 @@ jobs: ...@@ -92,7 +92,7 @@ jobs:
name: Identify models to test name: Identify models to test
run: | run: |
cd tests cd tests
echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
run_tests_single_gpu: run_tests_single_gpu:
name: Model tests name: Model tests
......
...@@ -32,7 +32,7 @@ jobs: ...@@ -32,7 +32,7 @@ jobs:
run: | run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [ `basename "${file}"` = "setup.py" ]; then if [ `basename "${file}"` = "setup.py" ]; then
echo ::set-output name=changed::"1" echo "changed=1" >> $GITHUB_OUTPUT
fi fi
done done
......
...@@ -145,8 +145,8 @@ jobs: ...@@ -145,8 +145,8 @@ jobs:
fi fi
echo $keys echo $keys
echo $test_map echo $test_map
echo "::set-output name=matrix::$keys" echo "matrix=$keys" >> $GITHUB_OUTPUT
echo "::set-output name=test_map::$test_map" echo "test_map=$test_map" >> $GITHUB_OUTPUT
run_tests_single_gpu: run_tests_single_gpu:
name: Model tests name: Model tests
......
...@@ -82,7 +82,7 @@ jobs: ...@@ -82,7 +82,7 @@ jobs:
name: Identify models to test name: Identify models to test
working-directory: /transformers/tests working-directory: /transformers/tests
run: | run: |
echo "::set-output name=matrix::$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" echo "matrix=$(python3 -c 'import os; tests = os.getcwd(); model_tests = os.listdir(os.path.join(tests, "models")); d1 = sorted(list(filter(os.path.isdir, os.listdir(tests)))); d2 = sorted(list(filter(os.path.isdir, [f"models/{x}" for x in model_tests]))); d1.remove("models"); d = d2 + d1; print(d)')" >> $GITHUB_OUTPUT
- name: NVIDIA-SMI - name: NVIDIA-SMI
run: | run: |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment