Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI to run forge build and test #7

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test

on:
pull_request:
merge_group:
push:
branches: [main]

env:
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true
matrix:
chapter: [chapter1]

name: Foundry project - ${{ matrix.chapter }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Run Forge build
id: build
working-directory: ./${{ matrix.chapter }}
run: forge build

- name: Run Forge test
id: test
working-directory: ./${{ matrix.chapter }}
run: forge test
2 changes: 1 addition & 1 deletion chapter1/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cache_path = "contracts/cache"
libs = ["contracts/lib"]

eof = true
odyssey = true
odyssey = true