Skip to content

Commit 1289b6c

Browse files
committed
adds foundry action
1 parent 619ce11 commit 1289b6c

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

.github/workflows/foundry-ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
9+
name: test
10+
11+
jobs:
12+
rust-base:
13+
uses: init4tech/actions/.github/workflows/rust-base.yml@main
14+
with:
15+
requires-private-deps: true
16+
secrets:
17+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
18+
19+
check:
20+
name: Foundry project
21+
needs: rust-base
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: recursive
27+
28+
- name: Install Foundry
29+
uses: foundry-rs/foundry-toolchain@v1
30+
31+
- name: Run tests
32+
run: cargo test -vvv --features=integration

.github/workflows/rust-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ jobs:
1212
with:
1313
requires-private-deps: true
1414
secrets:
15-
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
16-
15+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ path = "bin/builder.rs"
2121
name = "transaction-submitter"
2222
path = "bin/submit_transaction.rs"
2323

24+
[features]
25+
integration = []
26+
2427
[dependencies]
2528
init4-bin-base = "0.3"
2629

tests/block_builder_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mod tests {
2727
/// This test sets up a simulated environment using Anvil, creates a block builder,
2828
/// and verifies that the block builder can successfully build a block containing
2929
/// transactions from multiple senders.
30-
#[ignore = "integration test"]
30+
#[cfg(feature = "integration")]
3131
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
3232
async fn test_handle_build() {
3333
setup_logging();

0 commit comments

Comments
 (0)