Skip to content

Commit a7423ff

Browse files
committed
Directly trigger the GPU TPU tests instead of using unlabel.
`trigger_gpu_tpu_tests.yml` now calls `gpu_tests.yml` and `tpu_tests.yml` directly.
1 parent f18fca8 commit a7423ff

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.github/workflows/gpu_tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
types: [unlabeled]
88
release:
99
types: [created]
10+
workflow_call:
1011

1112
permissions:
1213
contents: read
@@ -16,11 +17,6 @@ jobs:
1617
test-in-container:
1718
name: Run tests on GPU
1819
runs-on: linux-x86-g2-16-l4-1gpu
19-
# Only run on pushes to master, releases or "kokoro:force-run" unlabel
20-
if: |
21-
github.event_name == 'push' ||
22-
github.event_name == 'release' ||
23-
(github.event.action == 'unlabeled' && github.event.label.name == 'kokoro:force-run')
2420

2521
strategy:
2622
fail-fast: false

.github/workflows/tpu_tests.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ name: Keras TPU Tests
33
on:
44
push:
55
branches: [master]
6-
pull_request_target:
7-
types: [unlabeled]
86
release:
97
types: [created]
8+
workflow_call:
109

1110
permissions:
1211
contents: read
@@ -22,11 +21,6 @@ jobs:
2221

2322
name: ${{ format('Run tests on {0}TPU', matrix.multi_device && 'multi-' || '') }}
2423
runs-on: ${{ matrix.multi_device && 'linux-x86-ct5lp-112-4tpu' || 'linux-x86-ct6e-44-1tpu' }}
25-
# Only run on pushes to master, releases or "kokoro:force-run" unlabel
26-
if: |
27-
github.event_name == 'push' ||
28-
github.event_name == 'release' ||
29-
(github.event.action == 'unlabeled' && github.event.label.name == 'kokoro:force-run')
3024

3125
container:
3226
image: python:3.11-slim

.github/workflows/trigger_gpu_tpu_tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Trigger GPU & TPU Tests
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [labeled]
66

77
permissions:
@@ -10,12 +10,22 @@ permissions:
1010
pull-requests: write
1111

1212
jobs:
13-
remove_label:
14-
name: Remove Label
13+
trigger:
14+
name: Trigger and Remove Label
1515
runs-on: ubuntu-latest
1616
if: github.event.action == 'labeled' && github.event.label.name == 'kokoro:force-run'
1717
steps:
18-
- uses: actions/github-script@v8
18+
- name: Checkout ${{ github.ref }}
19+
uses: actions/checkout@v6.0.2
20+
21+
- name: Trigger GPU Tests
22+
uses: ./.github/workflows/gpu_tests.yml
23+
24+
- name: Trigger TPU Tests
25+
uses: ./.github/workflows/tpu_tests.yml
26+
27+
- name: Remove Label
28+
uses: actions/github-script@v8
1929
with:
2030
script: |
2131
github.rest.issues.removeLabel({

0 commit comments

Comments
 (0)