Skip to content

chore: remove machine family #820

chore: remove machine family

chore: remove machine family #820

Workflow file for this run

name: Unit Tests
on: [push]
jobs:
# 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 }}
# - 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: Wait for Spot VM to initialize
# run: |
# echo "Waiting for Spot VM to initialize..."
# sleep 60
circuits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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: Install gke-gcloud-auth-plugin
run: |
gcloud components install gke-gcloud-auth-plugin -q
- name: Configure kubectl
run: |
gcloud container clusters get-credentials ${{ secrets.YOUR_CLUSTER_NAME }} --region ${{ secrets.YOUR_REGION }}
- name: Prepare and Deploy Circuits Job to GKE
env:
REPO_URL: "https://github.com/${{ github.repository }}"
COMMIT_HASH: "${{ github.sha }}"
run: |
# Prepare the job file with substituted environment variables
envsubst < kubernetes/circuit-test-job.yml > kubernetes/circuit-test-job-processed.yml
# Output the processed job file for verification
cat kubernetes/circuit-test-job-processed.yml
# Apply the job to GKE
kubectl apply -f kubernetes/circuit-test-job-processed.yml
# - name: Stream Logs from GKE
# run: |
# kubectl logs -f job/circuits-job
# circuits:
# name: circuits
# runs-on: self-hosted
# steps:
# - uses: actions/checkout@v3
# - name: Setup Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 18
# - name: Setup Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# components: rustfmt, clippy
# - name: Create bin directory
# run: mkdir -p $HOME/bin
# - name: Download circom v2.1.9 (Linux)
# run: |
# wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O $HOME/bin/circom
# chmod +x $HOME/bin/circom
# echo "PATH=$HOME/bin:$PATH" >> $GITHUB_ENV
# - name: Print circom version
# run: circom --version
# - name: Install yarn
# run: npm install -g yarn
# - name: Install dependencies
# run: yarn install --frozen-lockfile
# - name: Run tests
# working-directory: packages/circuits
# run: yarn test --maxWorkers=75% --no-cache
contracts:
name: contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b
- name: Run tests
working-directory: packages/contracts
run: yarn test
relayer:
name: relayer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly-0079a1146b79a4aeda58b0258215bedb1f92700b
- name: Build contracts
working-directory: packages/contracts
run: yarn build
- name: Run tests
working-directory: packages/relayer
run: cargo test
# stop-spot-vm:
# name: Stop Spot VM
# needs: [circuits, contracts, relayer]
# 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