Skip to content

Add workflow

Add workflow #6

Workflow file for this run

name: zkSync Foundry Tests
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
jobs:
check:
name: Foundry zkSync Tests
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install Foundry from Matter Labs
run: |
# Clone the repository (main branch)
git clone --depth 1 --branch main https://github.com/matter-labs/foundry-zksync.git
cd foundry-zksync
# Build from source
cargo build --release
# Create foundry directory
mkdir -p $HOME/.foundry/bin
# Copy binaries
cp target/release/forge $HOME/.foundry/bin/
cp target/release/cast $HOME/.foundry/bin/
cp target/release/anvil $HOME/.foundry/bin/
# Add to PATH
echo "$HOME/.foundry/bin" >> $GITHUB_PATH
# Display version
forge --version
- name: Build
run: |
forge build --zksync
- name: Run tests
run: |
forge test --zksync -vvv