datahaven/.github/workflows/task-foundry-tests.yml
undercover-cactus 4eca467514
ci: pin forge version when installing it (#243)
In this PR, we pin the forge version use in the linter task. When forge
make a new release it brokes the linter task.

In the future we can update  the forge version explicitly.

---------

Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
2025-10-23 14:33:27 +00:00

58 lines
1.4 KiB
YAML

# Foundry Tests: CI for Foundry components (smart contracts for EigenLayer and Snowbridge interaction)
#
# Overview:
# 1. All Foundry Tests: Executes the full suite of Foundry tests found within the `./contracts` directory
name: Foundry AVS Smart Contract Tests
on:
workflow_dispatch:
workflow_call:
env:
FOUNDRY_PROFILE: ci
jobs:
test:
strategy:
fail-fast: false
matrix:
partition: [1]
name: Foundry Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.4.3
- name: Cache Foundry libraries
uses: actions/cache@v4
with:
path: contracts/lib
key: ${{ runner.os }}-foundry-libs-${{ hashFiles('contracts/.gitmodules') }}
restore-keys: |
${{ runner.os }}-foundry-libs-
- name: Cache Foundry build artifacts
uses: actions/cache@v4
with:
path: |
contracts/out
contracts/cache
key: ${{ runner.os }}-foundry-build-${{ hashFiles('contracts/foundry.toml', 'contracts/**/*.sol') }}
restore-keys: |
${{ runner.os }}-foundry-build-
- run: forge --version
- run: forge fmt --check
- run: forge build --sizes
- run: forge test -vvv