Skip to content

Commit 2ae5958

Browse files
committed
build: cleanup pull request workflows
1 parent 1e35d9f commit 2ae5958

File tree

4 files changed

+12
-55
lines changed

4 files changed

+12
-55
lines changed

.github/workflows/build_tests.yaml

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,13 @@
1515
name: Build Tests
1616

1717
on:
18-
workflow_dispatch:
19-
inputs:
20-
tpu-type:
21-
description: 'TPU Type'
22-
required: true
23-
default: 'v4-8'
24-
type: choice
25-
options:
26-
- v4-8
2718
pull_request: # By default this runs for types assigned, opened and synchronize.
2819

20+
permissions:
21+
contents: read
22+
2923
jobs:
30-
set-variables:
31-
runs-on: [ubuntu-22.04]
32-
concurrency:
33-
group: set-variables-${{ github.event.number}}
34-
cancel-in-progress: true
35-
outputs:
36-
run-id: ${{steps.set-run-id.outputs.run-id}}
37-
steps:
38-
- name: set run-id
39-
id: set-run-id
40-
run: |
41-
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
42-
RUN_ID="dispatch"
43-
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
44-
RUN_ID="main"
45-
else
46-
RUN_ID="${{ github.event.number }}"
47-
fi
48-
echo run-id=$RUN_ID >> $GITHUB_OUTPUT
4924
install-dependencies:
50-
needs: [set-variables]
5125
runs-on: ubuntu-22.04
5226
strategy:
5327
matrix:
@@ -85,23 +59,11 @@ jobs:
8559
${{env.pythonLocation}}
8660
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
8761
linter:
88-
needs: [install-dependencies, set-variables]
89-
concurrency: # We support one build or nightly test to run at a time currently.
90-
group: linter-${{needs.set-variables.outputs.run-id}}
91-
cancel-in-progress: true
62+
needs: [install-dependencies]
9263
uses: ./.github/workflows/reusable_lint_and_format.yml
93-
with:
94-
run-id: '${{needs.set-variables.outputs.run-id}}'
9564
verify-goldens:
96-
needs: [install-dependencies, set-variables]
65+
needs: [install-dependencies]
9766
uses: ./.github/workflows/reusable_goldens.yaml
98-
with:
99-
run-id: '${{needs.set-variables.outputs.run-id}}'
10067
run-unit-tests:
101-
needs: [install-dependencies, set-variables]
68+
needs: [install-dependencies]
10269
uses: ./.github/workflows/reusable_unit_tests.yaml
103-
with:
104-
run-id: ${{needs.set-variables.outputs.run-id}}
105-
concurrency: # We support one build or nightly test to run at a time currently.
106-
group: unit-tests-${{needs.set-variables.outputs.run-id}}
107-
cancel-in-progress: true

.github/workflows/reusable_goldens.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
on:
1616
workflow_call:
17-
inputs:
18-
run-id:
19-
required: true
20-
type: string
2117

2218
permissions:
2319
contents: read

.github/workflows/reusable_lint_and_format.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ name: Lint and Format
1616

1717
on:
1818
workflow_call:
19-
inputs:
20-
run-id:
21-
required: true
22-
type: string
19+
20+
permissions:
21+
contents: read
2322

2423
jobs:
2524
build-and-test:

.github/workflows/reusable_unit_tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
on:
1616
workflow_call:
1717
inputs:
18-
run-id:
19-
required: true
20-
type: string
18+
19+
permissions:
20+
contents: read
2121

2222
jobs:
2323
run-unit-tests:

0 commit comments

Comments
 (0)