Skip to content

Commit e697c6e

Browse files
committed
feat: add DWS flex tests
1 parent 77dbfd3 commit e697c6e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/nightly_tests.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ permissions:
2424

2525
env:
2626
CLUSTER_NETWORK_ARGUMENTS: "--network=${{secrets.NETWORK_NAME}} --subnetwork=${{secrets.SUBNETWORK_NAME}}"
27+
CLUSTER_NETWORK_ARGUMENTS_DWS: "--network=${{secrets.NETWORK_NAME}} --subnetwork=${{secrets.SUBNETWORK_NAME_DWS}}"
2728

2829
jobs:
2930
build_wheel:
@@ -39,7 +40,8 @@ jobs:
3940
env:
4041
EMPTY_CLUSTER_NAME: nightly-xpk-zero-nodepools
4142
PRIVATE_CLUSTER_NAME: nightly-xpk-private-2-v4-8-nodepools
42-
TPU_CLUSTER_NAME: nightly-xpk-2-v4-8-nodepools
43+
DWS_FLEX_CLUSTER_NAME: xpk-dws-nightly-test-2-v4-8-nodepools
44+
TPU_CLUSTER_NAME: nightly-xpk-2-v5p-8-nodepools
4345
WORKLOAD_NAME: xpktest-nightly-${{ github.run_attempt }}
4446
steps:
4547
- uses: actions/download-artifact@v4
@@ -140,6 +142,14 @@ jobs:
140142
- name: Delete the cluster created
141143
if: always()
142144
run: xpk cluster delete --cluster $TPU_CLUSTER_NAME --zone=us-central2-b --force
145+
- name: Create a DWS flex queued xpk cluster
146+
run: xpk cluster create --cluster ${DWS_FLEX_CLUSTER_NAME} --tpu-type=v5p-8 --num-slices=1 --zone=us-east5-a --default-pool-cpu-num-nodes=2 --flex --custom-cluster-arguments="${CLUSTER_NETWORK_ARGUMENTS_DWS}"
147+
- name: Run dws flex queued TPU workload
148+
run: xpk workload create --workload xpktest-build-${{ github.run_attempt }}-dws --cluster ${DWS_FLEX_CLUSTER_NAME} --zone=us-east5-a --tpu-type=v5p-8 --flex --command "echo foo" --num-slices=1
149+
- name: Wait for workload completion and confirm it succeeded
150+
run: xpk workload list --cluster ${DWS_FLEX_CLUSTER_NAME} --zone=us-east5-a --wait-for-job-completion xpktest-build-${{ github.run_attempt }}-dws --timeout 1000
151+
- name: Delete the DWS flex queued cluster
152+
run: xpk cluster delete --cluster ${DWS_FLEX_CLUSTER_NAME}
143153
- name: Upload cluster nodepool creation log
144154
if: always()
145155
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)