Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
IrvingMg committed Jan 28, 2025
1 parent d7aeeb9 commit d306f89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ jobs:
- name: Authenticate Docker
run: gcloud auth configure-docker --quiet
- name: Create test script to execute in workloads
run: echo -e '#!/bin/bash \n echo "Hello world from a test script!"' > workload.sh
run: echo -e '#!/bin/bash \nsleep 3 \necho "Hello world from a test script!"' > workload.sh
- name: Run a job
run: |
python xpk.py run --cluster $TPU_CLUSTER_NAME --zone=us-central2-b workload.sh | awk '/Starting log streaming for pod xpk-def-app-profile-slurm-[a-zA-Z0-9]+-[0-9]+-[a-zA-Z0-9]+.../,/Job logs streaming finished./ { print }'
- name: Run a base-docker-image workload
run: python xpk.py workload create --cluster $TPU_CLUSTER_NAME --workload $WORKLOAD_NAME --command "bash workload.sh" --tpu-type=$TPU_TYPE --num-slices=2 --zone=us-central2-b
- name: Run xpk inspector with the workload created above
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ install-kueuectl: mkdir-bin

.PHONY: install-kjobctl
install-kjobctl: mkdir-bin
curl -Lo $(BIN_PATH)/kubectl-kjob $(KJOBCTL_URL)
chmod +x $(BIN_PATH)/kubectl-kjob
# TODO: Upgrade kjob to the latest version to support the '--wait' flag.
docker build -f tools/Dockerfile-kjob -t $(KJOB_DOCKER_IMG) tools/
docker run -idt --name $(KJOB_DOCKER_CONTAINER) $(KJOB_DOCKER_IMG)
docker cp $(KJOB_DOCKER_CONTAINER):/kjob/bin/kubectl-kjob $(BIN_PATH)/kubectl-kjob
docker rm -f $(KJOB_DOCKER_CONTAINER)
docker image rm $(KJOB_DOCKER_IMG)

.PHONY: check-gcloud
check-gcloud:
Expand Down

0 comments on commit d306f89

Please sign in to comment.