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

ci: add ci to actions #4

Closed
wants to merge 9 commits into from
Closed
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
55 changes: 33 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
name: test
name: Foundry project

on: workflow_dispatch

env:
FOUNDRY_PROFILE: ci
on:
push:
branches:
- main
- idea404/updated-syntax
pull_request:

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive

- name: Initialize submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive

- name: Clean workspace
run: git clean -fdx

- name: List directories for debugging
run: |
echo "Listing lib/omni/contracts:"
ls -R lib/omni/contracts
echo "Listing lib/forge-std:"
ls -R lib/forge-std

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

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build
- name: Verify foundry.toml configuration
run: cat foundry.toml

- name: Run Forge tests
run: |
forge test -vvv
id: test
- name: Verify forge installation
run: which forge

- name: Build project
run: forge build --sizes
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
src = "src"
out = "out"
libs = ["lib"]
remappings = ["@omni/=lib/omni/", "@forge-std/=lib/forge-std/"]

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
Loading