Skip to content

ci(tempo): run testnet on PRs #646

ci(tempo): run testnet on PRs

ci(tempo): run testnet on PRs #646

Workflow file for this run

name: CI Tempo
permissions: {}
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
inputs:
network:
description: "Tempo network to check"
required: true
type: choice
options:
- testnet
- devnet
- mainnet
- all
scripts:
description: "Which scripts to run"
required: false
type: choice
default: "both"
options:
- check
- deploy
- both
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: "sccache"
jobs:
tempo-check:
runs-on: depot-ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
steps:
# Checkout the repository
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable
- uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
# Build and install binaries
- name: Build and install Foundry binaries
run: |
cargo build --profile dev --locked -p forge -p cast -p anvil -p chisel
echo "${{ github.workspace }}/target/debug" >> "$GITHUB_PATH"
# - name: Run Tempo check on devnet
# if: |
# github.event_name == 'pull_request' ||
# github.event.inputs.network == 'devnet' ||
# github.event.inputs.network == 'all'
# env:
# ETH_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }}
# SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
# run: |
# if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
# ./.github/scripts/tempo-check.sh
# fi
# if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
# ./.github/scripts/tempo-deploy.sh
# fi
# - name: Run Tempo wallet tests on devnet
# if: |
# github.event_name == 'pull_request' ||
# github.event.inputs.network == 'devnet' ||
# github.event.inputs.network == 'all'
# env:
# ETH_RPC_URL: ${{ secrets.TEMPO_DEVNET_RPC_URL }}
# run: ./.github/scripts/tempo-wallet.sh
- name: Run Tempo check on testnet
if: |
github.event_name == 'pull_request' ||
github.event.inputs.network == 'testnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_TESTNET_RPC_URL }}
VERIFIER_URL: ${{ secrets.VERIFIER_URL }}
SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
run: |
if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-check.sh
fi
if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-deploy.sh
fi
- name: Run Tempo check on mainnet
if: |
github.event.inputs.network == 'mainnet' ||
github.event.inputs.network == 'all'
env:
ETH_RPC_URL: ${{ secrets.TEMPO_MAINNET_RPC_URL }}
TEMPO_FEE_TOKEN: "0x20c0000000000000000000000000000000000000"
VERIFIER_URL: ${{ secrets.VERIFIER_URL }}
PRIVATE_KEY: ${{ secrets.THROW_AWAY_MAINNET_PKEY }}
SCRIPTS: ${{ github.event.inputs.scripts || 'both' }}
run: |
if [ "$SCRIPTS" = "check" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-check.sh
fi
if [ "$SCRIPTS" = "deploy" ] || [ "$SCRIPTS" = "both" ]; then
./.github/scripts/tempo-deploy.sh
fi