Skip to content

Commit

Permalink
Add CI to run forge build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
jenpaff committed Oct 10, 2024
1 parent 56639cb commit 5bf7cee
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
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: 2 additions & 0 deletions chapter1/contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
cache/
out/
lib/
*.pem
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
alphanet = true

0 comments on commit 5bf7cee

Please sign in to comment.