Skip to content

Commit 6666be1

Browse files
authored
Run all periodic models when ciflow/periodic label is present (#13634)
1 parent 5f2b1d3 commit 6666be1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/periodic.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
branches:
1212
- release/*
1313
workflow_dispatch:
14+
pull_request:
15+
types: [opened, synchronize, reopened, labeled, unlabeled]
1416

1517
concurrency:
1618
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }}
@@ -32,10 +34,11 @@ jobs:
3234
python-version: '3.10'
3335
- name: Extract the list of models to test
3436
id: gather-models
37+
env:
38+
EFFECTIVE_EVENT: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ciflow/periodic') && 'schedule' || github.event_name }}
3539
run: |
3640
set -eux
37-
38-
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "${GITHUB_EVENT_NAME}"
41+
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "${EFFECTIVE_EVENT}"
3942
4043
test-models-linux:
4144
name: test-models-linux

0 commit comments

Comments
 (0)