Skip to content

Commit c907720

Browse files
committed
adds foundry action
1 parent 619ce11 commit c907720

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.github/workflows/foundry-ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on: [push]
2+
3+
name: test
4+
5+
jobs:
6+
rust-base:
7+
uses: init4tech/actions/.github/workflows/rust-base.yml@main
8+
with:
9+
requires-private-deps: true
10+
secrets:
11+
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
12+
13+
check:
14+
name: Foundry project
15+
needs: rust-base
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Install Foundry
23+
uses: foundry-rs/foundry-toolchain@v1
24+
25+
- name: Run tests
26+
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)