Skip to content

Commit

Permalink
Finish him
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt committed Jul 17, 2024
1 parent 2963bc5 commit d45698d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

env:
CARGO_TERM_COLOR: always
PLAYGROUND_DIR: /tmp/playground

jobs:
integration:
Expand Down Expand Up @@ -54,28 +55,16 @@ jobs:
- name: Run integration tests
run: cargo test --package rbuilder --lib -- integration::tests::test_simple_example --exact

- name: Check contents suave-playground
if: ${{ failure() }}
run: |
pwd
ls ./
ls /tmp/playground
ls /tmp/playground/logs
- name: More stuff
if: ${{ failure() }}
run: |
ls /tmp
cat /tmp/rbuilder.toml
- name: Move logs to playground logs
- name: Move test integration logs to playground logs to archive
# This steps fails if the test fails early and the playground logs dir has not been created
if: ${{ failure() }}
run: |
mv integration_logs /tmp/playground/logs
- name: Upload playground artifacts
- name: Archive playground logs
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playground-logs
path: /tmp/playground/logs
retention-days: 5
4 changes: 3 additions & 1 deletion crates/rbuilder/src/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use config::CONFIG;
pub enum FakeMevBoostRelayError {
SpawnError,
BinaryNotFound,
IntegrationPathNotFound,
}

pub struct FakeMevBoostRelay {}
Expand Down Expand Up @@ -59,7 +60,8 @@ impl FakeMevBoostRelay {
}

fn try_spawn(self) -> Result<Option<FakeMevBoostRelayInstance>, FakeMevBoostRelayError> {
let playground_dir = std::env::var("PLAYGROUND_DIR").unwrap();
let playground_dir = std::env::var("PLAYGROUND_DIR")
.map_err(|_| FakeMevBoostRelayError::IntegrationPathNotFound)?;

// append to the config template the paths to the playground
let mut config = CONFIG.to_string();
Expand Down

0 comments on commit d45698d

Please sign in to comment.