Skip to content

Commit d99f40f

Browse files
authored
Remove integration tests from feature branches (#641)
* build: remove integration tests from feature branches * build: add old integration tests to nightly builds * build: specify missing permissions
1 parent 9f0d561 commit d99f40f

File tree

2 files changed

+180
-120
lines changed

2 files changed

+180
-120
lines changed

.github/workflows/build_tests.yaml

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ jobs:
3535
group: set-variables-${{ github.event.number}}
3636
cancel-in-progress: true
3737
outputs:
38-
cluster-name: ${{ steps.set-cluster-name.outputs.cluster-name }}
39-
cluster-name-dws: ${{ steps.set-cluster-name-dws.outputs.cluster-name-dws }}
40-
group-name: ${{ steps.set-group-name.outputs.group-name }}
41-
zone: ${{ steps.set-zone.outputs.zone }}
42-
tpu-type: ${{ steps.set-tpu-type.outputs.tpu-type }}
43-
tpu-type-topology: ${{ steps.set-tpu-type-topology.outputs.tpu-type-topology }}
44-
location: ${{steps.set-location.outputs.location}}
4538
run-id: ${{steps.set-run-id.outputs.run-id}}
4639
steps:
4740
- name: set run-id
@@ -57,34 +50,6 @@ jobs:
5750
RUN_ID="${{ github.event.number }}"
5851
fi
5952
echo run-id=$RUN_ID >> $GITHUB_OUTPUT
60-
- name: set cluster-name
61-
id: set-cluster-name
62-
run: |
63-
echo cluster-name=build-xpk-2-nodepools-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
64-
- name: set cluster-name-dws
65-
id: set-cluster-name-dws
66-
run: |
67-
echo cluster-name-dws=build-xpk-2-nodepools-dws-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
68-
- name: set group-name
69-
id: set-group-name
70-
run: |
71-
echo group-name=xpk-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
72-
- name: set zone
73-
id: set-zone
74-
run: |
75-
echo zone=us-central2-b >> $GITHUB_OUTPUT
76-
- name: set tpu-type
77-
id: set-tpu-type
78-
run: |
79-
echo tpu-type=v4-8 >> $GITHUB_OUTPUT
80-
- name: set tpu-type-topology
81-
id: set-tpu-type-topology
82-
run: |
83-
echo tpu-type-topology=v4-2x2x1 >> $GITHUB_OUTPUT
84-
- name: set location
85-
id: set-location
86-
run: |
87-
echo location=us-central2 >> $GITHUB_OUTPUT
8853
install-dependencies:
8954
needs: [set-variables]
9055
runs-on: ubuntu-22.04
@@ -144,86 +109,3 @@ jobs:
144109
concurrency: # We support one build or nightly test to run at a time currently.
145110
group: unit-tests-${{needs.set-variables.outputs.run-id}}
146111
cancel-in-progress: true
147-
run-integration-tests:
148-
needs: [install-dependencies, set-variables]
149-
uses: ./.github/workflows/reusable_integration_tests.yaml
150-
with:
151-
run-id: '${{needs.set-variables.outputs.run-id}}'
152-
concurrency: # We support one build or nightly test to run at a time currently.
153-
group: integration-tests-${{needs.set-variables.outputs.run-id}}
154-
cancel-in-progress: true
155-
secrets: inherit
156-
cluster-private:
157-
needs: [linter, run-unit-tests, run-integration-tests, set-variables]
158-
uses: ./.github/workflows/reusable_cluster_private.yaml
159-
concurrency: # We support one build or nightly test to run at a time currently.
160-
group: cluster-private-${{needs.set-variables.outputs.run-id}}
161-
cancel-in-progress: true
162-
with:
163-
run-id: '${{needs.set-variables.outputs.run-id}}'
164-
cluster-name: '${{needs.set-variables.outputs.cluster-name}}'
165-
tpu-type: '${{needs.set-variables.outputs.tpu-type-topology || inputs.tpu-type}}'
166-
zone: '${{needs.set-variables.outputs.zone}}'
167-
location: '${{needs.set-variables.outputs.location}}'
168-
secrets: inherit
169-
cluster-create:
170-
needs: [linter, run-unit-tests, run-integration-tests, set-variables]
171-
concurrency: # We support one build or nightly test to run at a time currently.
172-
group: cluster-create-${{needs.set-variables.outputs.run-id}}
173-
cancel-in-progress: true
174-
uses: ./.github/workflows/reusable_cluster_create.yaml
175-
with:
176-
cluster-name-dws: '${{needs.set-variables.outputs.cluster-name-dws}}'
177-
cluster-name: '${{needs.set-variables.outputs.cluster-name}}'
178-
tpu-type: '${{needs.set-variables.outputs.tpu-type-topology || inputs.tpu-type}}'
179-
zone: '${{needs.set-variables.outputs.zone}}'
180-
location: '${{needs.set-variables.outputs.location}}'
181-
run-id: '${{needs.set-variables.outputs.run-id}}'
182-
secrets: inherit
183-
workloads-tests:
184-
needs: [cluster-create, set-variables]
185-
uses: ./.github/workflows/reusable_workload_tests.yaml
186-
concurrency: # We support one build or nightly test to run at a time currently.
187-
group: workload-tests-${{needs.set-variables.outputs.run-id}}
188-
cancel-in-progress: true
189-
with:
190-
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
191-
cluster-name-dws: '${{needs.set-variables.outputs.cluster-name-dws}}'
192-
tpu-type: ${{needs.set-variables.outputs.tpu-type}}
193-
tpu-type-topology: ${{needs.set-variables.outputs.tpu-type-topology}}
194-
zone: ${{needs.set-variables.outputs.zone}}
195-
run-id: '${{needs.set-variables.outputs.run-id}}'
196-
secrets: inherit
197-
batch-tests:
198-
needs: [cluster-create, set-variables]
199-
uses: ./.github/workflows/reusable_batch_tests.yaml
200-
concurrency: # We support one build or nightly test to run at a time currently.
201-
group: batch-tests-${{needs.set-variables.outputs.run-id}}
202-
cancel-in-progress: true
203-
with:
204-
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
205-
zone: ${{needs.set-variables.outputs.zone}}
206-
run-id: ${{needs.set-variables.outputs.run-id}}
207-
secrets: inherit
208-
storage-tests:
209-
needs: [cluster-create, set-variables, batch-tests, workloads-tests]
210-
uses: ./.github/workflows/reusable_storage_tests.yaml
211-
concurrency: # We support one build or nightly test to run at a time currently.
212-
group: storage-tests-${{needs.set-variables.outputs.run-id}}
213-
cancel-in-progress: true
214-
with:
215-
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
216-
tpu-type: ${{needs.set-variables.outputs.tpu-type}}
217-
zone: ${{needs.set-variables.outputs.zone}}
218-
run-id: ${{needs.set-variables.outputs.run-id}}
219-
secrets: inherit
220-
cluster-delete:
221-
if: always()
222-
needs: [set-variables, storage-tests]
223-
uses: ./.github/workflows/reusable_cluster_delete.yaml
224-
with:
225-
cluster-name-dws: ${{needs.set-variables.outputs.cluster-name-dws}}
226-
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
227-
run-id: ${{needs.set-variables.outputs.run-id}}
228-
zone: ${{needs.set-variables.outputs.zone}}
229-
secrets: inherit

.github/workflows/nightly_tests.yaml

Lines changed: 180 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
name: Nightly Tests
1616

1717
on:
18-
push:
19-
branches: ["develop"]
2018
workflow_dispatch:
2119
schedule: # Schedule the job run at 12AM PST daily.
2220
- cron: '0 8 * * *'
2321

22+
permissions:
23+
contents: read
2424

2525
env:
2626
CLUSTER_NETWORK_ARGUMENTS: "--network=${{secrets.NETWORK_NAME}} --subnetwork=${{secrets.SUBNETWORK_NAME}}"
@@ -230,3 +230,181 @@ jobs:
230230
- name: Delete the RayCluster-enabled XPK cluster
231231
if: always()
232232
run: python xpk.py cluster delete --cluster $TPU_CLUSTER_NAME --zone=us-central2-b
233+
234+
set-variables:
235+
runs-on: [ubuntu-22.04]
236+
concurrency:
237+
group: set-variables-${{ github.event.number}}
238+
cancel-in-progress: true
239+
outputs:
240+
cluster-name: ${{ steps.set-cluster-name.outputs.cluster-name }}
241+
cluster-name-dws: ${{ steps.set-cluster-name-dws.outputs.cluster-name-dws }}
242+
group-name: ${{ steps.set-group-name.outputs.group-name }}
243+
zone: ${{ steps.set-zone.outputs.zone }}
244+
tpu-type: ${{ steps.set-tpu-type.outputs.tpu-type }}
245+
tpu-type-topology: ${{ steps.set-tpu-type-topology.outputs.tpu-type-topology }}
246+
location: ${{steps.set-location.outputs.location}}
247+
run-id: ${{steps.set-run-id.outputs.run-id}}
248+
steps:
249+
- name: set run-id
250+
id: set-run-id
251+
run: |
252+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
253+
RUN_ID="dispatch"
254+
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
255+
RUN_ID="main"
256+
elif [ "${{ github.ref }}" == "refs/heads/develop" ]; then
257+
RUN_ID="develop"
258+
else
259+
RUN_ID="${{ github.event.number }}"
260+
fi
261+
echo run-id=$RUN_ID >> $GITHUB_OUTPUT
262+
- name: set cluster-name
263+
id: set-cluster-name
264+
run: |
265+
echo cluster-name=build-xpk-2-nodepools-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
266+
- name: set cluster-name-dws
267+
id: set-cluster-name-dws
268+
run: |
269+
echo cluster-name-dws=build-xpk-2-nodepools-dws-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
270+
- name: set group-name
271+
id: set-group-name
272+
run: |
273+
echo group-name=xpk-${{steps.set-run-id.outputs.run-id}} >> $GITHUB_OUTPUT
274+
- name: set zone
275+
id: set-zone
276+
run: |
277+
echo zone=us-central2-b >> $GITHUB_OUTPUT
278+
- name: set tpu-type
279+
id: set-tpu-type
280+
run: |
281+
echo tpu-type=v4-8 >> $GITHUB_OUTPUT
282+
- name: set tpu-type-topology
283+
id: set-tpu-type-topology
284+
run: |
285+
echo tpu-type-topology=v4-2x2x1 >> $GITHUB_OUTPUT
286+
- name: set location
287+
id: set-location
288+
run: |
289+
echo location=us-central2 >> $GITHUB_OUTPUT
290+
install-dependencies:
291+
needs: [set-variables]
292+
runs-on: ubuntu-22.04
293+
strategy:
294+
matrix:
295+
python-version: ["3.10", "3.11"]
296+
steps:
297+
- uses: actions/checkout@v4
298+
- uses: google-github-actions/setup-gcloud@v2
299+
with:
300+
version: '>= 363.0.0'
301+
install_components: 'beta, gke-gcloud-auth-plugin'
302+
- uses: actions/setup-python@v5
303+
with:
304+
python-version: ${{ matrix.python-version }}
305+
- name: Check if cache exists
306+
id: check-cache
307+
uses: actions/cache@v3
308+
with:
309+
path: |
310+
usr/local/bin/
311+
~/.cache/pip
312+
${{env.pythonLocation}}
313+
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
314+
lookup-only: true
315+
- name: install dependencies
316+
if : steps.check-cache.outputs.cache-hit != 'true'
317+
run: make install-dev && cp ./bin/kubectl-kueue /usr/local/bin/kubectl-kueue && cp ./bin/kubectl-kjob /usr/local/bin/kubectl-kjob
318+
- name: Cache dependencies
319+
if : steps.check-cache.outputs.cache-hit != 'true'
320+
uses: actions/cache/save@v3
321+
with:
322+
path: |
323+
/usr/local/bin/kubectl-kueue
324+
/usr/local/bin/kubectl-kjob
325+
~/.cache/pip
326+
${{env.pythonLocation}}
327+
key: xpk-deps-${{ matrix.python-version }}-${{github.run_id}}-${{github.run_attempt}}
328+
run-integration-tests:
329+
needs: [install-dependencies, set-variables]
330+
uses: ./.github/workflows/reusable_integration_tests.yaml
331+
with:
332+
run-id: '${{needs.set-variables.outputs.run-id}}'
333+
concurrency: # We support one build or nightly test to run at a time currently.
334+
group: integration-tests-${{needs.set-variables.outputs.run-id}}
335+
cancel-in-progress: true
336+
secrets: inherit
337+
cluster-private:
338+
needs: [run-integration-tests, set-variables]
339+
uses: ./.github/workflows/reusable_cluster_private.yaml
340+
concurrency: # We support one build or nightly test to run at a time currently.
341+
group: cluster-private-${{needs.set-variables.outputs.run-id}}
342+
cancel-in-progress: true
343+
with:
344+
run-id: '${{needs.set-variables.outputs.run-id}}'
345+
cluster-name: '${{needs.set-variables.outputs.cluster-name}}'
346+
tpu-type: '${{needs.set-variables.outputs.tpu-type-topology || inputs.tpu-type}}'
347+
zone: '${{needs.set-variables.outputs.zone}}'
348+
location: '${{needs.set-variables.outputs.location}}'
349+
secrets: inherit
350+
cluster-create:
351+
needs: [run-integration-tests, set-variables]
352+
concurrency: # We support one build or nightly test to run at a time currently.
353+
group: cluster-create-${{needs.set-variables.outputs.run-id}}
354+
cancel-in-progress: true
355+
uses: ./.github/workflows/reusable_cluster_create.yaml
356+
with:
357+
cluster-name-dws: '${{needs.set-variables.outputs.cluster-name-dws}}'
358+
cluster-name: '${{needs.set-variables.outputs.cluster-name}}'
359+
tpu-type: '${{needs.set-variables.outputs.tpu-type-topology || inputs.tpu-type}}'
360+
zone: '${{needs.set-variables.outputs.zone}}'
361+
location: '${{needs.set-variables.outputs.location}}'
362+
run-id: '${{needs.set-variables.outputs.run-id}}'
363+
secrets: inherit
364+
workloads-tests:
365+
needs: [cluster-create, set-variables]
366+
uses: ./.github/workflows/reusable_workload_tests.yaml
367+
concurrency: # We support one build or nightly test to run at a time currently.
368+
group: workload-tests-${{needs.set-variables.outputs.run-id}}
369+
cancel-in-progress: true
370+
with:
371+
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
372+
cluster-name-dws: '${{needs.set-variables.outputs.cluster-name-dws}}'
373+
tpu-type: ${{needs.set-variables.outputs.tpu-type}}
374+
tpu-type-topology: ${{needs.set-variables.outputs.tpu-type-topology}}
375+
zone: ${{needs.set-variables.outputs.zone}}
376+
run-id: '${{needs.set-variables.outputs.run-id}}'
377+
secrets: inherit
378+
batch-tests:
379+
needs: [cluster-create, set-variables]
380+
uses: ./.github/workflows/reusable_batch_tests.yaml
381+
concurrency: # We support one build or nightly test to run at a time currently.
382+
group: batch-tests-${{needs.set-variables.outputs.run-id}}
383+
cancel-in-progress: true
384+
with:
385+
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
386+
zone: ${{needs.set-variables.outputs.zone}}
387+
run-id: ${{needs.set-variables.outputs.run-id}}
388+
secrets: inherit
389+
storage-tests:
390+
needs: [cluster-create, set-variables, batch-tests, workloads-tests]
391+
uses: ./.github/workflows/reusable_storage_tests.yaml
392+
concurrency: # We support one build or nightly test to run at a time currently.
393+
group: storage-tests-${{needs.set-variables.outputs.run-id}}
394+
cancel-in-progress: true
395+
with:
396+
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
397+
tpu-type: ${{needs.set-variables.outputs.tpu-type}}
398+
zone: ${{needs.set-variables.outputs.zone}}
399+
run-id: ${{needs.set-variables.outputs.run-id}}
400+
secrets: inherit
401+
cluster-delete:
402+
if: always()
403+
needs: [set-variables, storage-tests]
404+
uses: ./.github/workflows/reusable_cluster_delete.yaml
405+
with:
406+
cluster-name-dws: ${{needs.set-variables.outputs.cluster-name-dws}}
407+
cluster-name: ${{needs.set-variables.outputs.cluster-name}}
408+
run-id: ${{needs.set-variables.outputs.run-id}}
409+
zone: ${{needs.set-variables.outputs.zone}}
410+
secrets: inherit

0 commit comments

Comments
 (0)