Add paths filter to avoid the chance of being triggered (#30453)

* trigger

* remove the last job

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2024-04-24 16:58:54 +02:00 committed by GitHub
parent d26c14139c
commit 42fed15c81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,8 @@ name: PR slow CI
on:
pull_request:
paths:
- "src/transformers/models/*/modeling_*.py"
env:
HF_HOME: /mnt/cache
@ -108,18 +110,3 @@ jobs:
with:
name: ${{ matrix.machine_type }}_run_all_tests_gpu_${{ env.matrix_folders }}_test_reports
path: /transformers/reports/${{ matrix.machine_type }}_tests_gpu_${{ matrix.folders }}
slow_test_result:
runs-on: ubuntu-22.04
name: Check slow test status
needs: [check_for_new_model, run_new_model_tests]
if: always()
steps:
- name: Check test status
shell: bash
# NOT a new model PR --> pass
# new model PR --> pass only if `run_new_model_tests` gives `success` (so if the label is not added, we fail
# this job even if `run_new_model_tests` has `skipped` status).
run: |
echo "${{ needs.run_new_model_tests.result }}"
if [ "${{ needs.check_for_new_model.outputs.new_model }}" = "" ]; then echo "not new model"; elif [ "${{ needs.run_new_model_tests.result }}" != "success" ]; then echo "failure"; exit -1; else echo "pass"; fi;