Skip to content

Try launching unit tests on TPUs from CI #8

Try launching unit tests on TPUs from CI

Try launching unit tests on TPUs from CI #8

Workflow file for this run

name: CI with GCP TPU
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
tpu-zone: ["us-central2-b"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Configure Google Cloud
run: |
gcloud config set project ${{ secrets.GCP_PROJECT_ID }}
- name: Create VM and Run Script
run: |
export TPU_NAME=ci-run-${{ github.run_id }}
infra/babysit-tpu-vm.sh $TPU_NAME -z ${{ matrix.tpu-zone }} -t v4-8 --preemptible -s infra/helpers/setup-tpu-vm-tests.sh -- \
bash levanter/infra/run.sh pytest tests