Skip to content

Commit

Permalink
feat: add start/stop vm process
Browse files Browse the repository at this point in the history
  • Loading branch information
wshino committed Dec 12, 2024
1 parent b5fdda8 commit dc0435f
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ name: Unit Tests
on: [push]

jobs:
# start-spot-vm:
# name: Start Spot VM
# runs-on: ubuntu-latest
start-spot-vm:
name: Start Spot VM
runs-on: ubuntu-latest

# steps:
# - name: Authenticate with GCP
# uses: google-github-actions/auth@v2
# with:
# credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
steps:
- name: Authenticate with GCP
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

# - name: 'Set up Cloud SDK'
# uses: 'google-github-actions/setup-gcloud@v2'
# with:
# version: '>= 363.0.0'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'

# - name: Start Spot VM
# run: gcloud compute instances start email-tx-builder-runner-spot --zone=us-central1-c
- name: Start Spot VM
run: gcloud compute instances start email-tx-builder-runner-spot --zone=us-central1-c

# - name: Wait for Spot VM to initialize
# run: |
# echo "Waiting for Spot VM to initialize..."
# sleep 60
- name: Wait for Spot VM to initialize
run: |
echo "Waiting for Spot VM to initialize..."
sleep 60
circuits:
name: circuits
Expand Down Expand Up @@ -122,20 +122,20 @@ jobs:
working-directory: packages/relayer
run: cargo test

# stop-spot-vm:
# name: Stop Spot VM
# needs: [circuits, contracts]
# runs-on: ubuntu-latest
# steps:
# - name: Authenticate with GCP
# uses: google-github-actions/auth@v2
# with:
# credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

# - name: 'Set up Cloud SDK'
# uses: 'google-github-actions/setup-gcloud@v2'
# with:
# version: '>= 363.0.0'

# - name: Stop Spot VM
# run: gcloud compute instances stop email-tx-builder-runner-spot --zone=us-central1-c
stop-spot-vm:
name: Stop Spot VM
needs: [circuits, contracts]
runs-on: ubuntu-latest
steps:
- name: Authenticate with GCP
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'

- name: Stop Spot VM
run: gcloud compute instances stop email-tx-builder-runner-spot --zone=us-central1-c

0 comments on commit dc0435f

Please sign in to comment.