Revert "forge install: safe-singleton-deployer-sol" #770
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
name: circuits | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install unzip | |
run: sudo apt-get install -y unzip | |
- name: Install bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- 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: self-hosted | |
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 | |
- name: Run script tests | |
working-directory: packages/contracts | |
run: yarn test:script | |
relayer: | |
name: relayer | |
runs-on: self-hosted | |
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 |