Skip to content

Commit

Permalink
Add CI to run forge build and test (#7)
Browse files Browse the repository at this point in the history
* Add CI to run forge build and test

* Rename to odyssey config
  • Loading branch information
jenpaff authored Oct 10, 2024
1 parent 56639cb commit 9bd89b9
Show file tree
Hide file tree
Showing 2 changed files with 38 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: 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

0 comments on commit 9bd89b9

Please sign in to comment.