Skip to content

Commit

Permalink
Add feature to disable docker tests on MacOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gligneul committed Oct 30, 2024
1 parent e366b61 commit 0f960b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .ci/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ if [ "$CFG_RELEASE_CHANNEL" == "nightly" ]; then
else
cargo build --locked
fi
cargo test

UNAME=$(uname -s)
if [ "$UNAME" == "Darwin" ]; then
# Disable docker tests on MacOS CI
cargo test --no-default-features
else
cargo test
fi
4 changes: 4 additions & 0 deletions main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ license.workspace = true
version.workspace = true
repository.workspace = true

[features]
default = ["docker-test"]
docker-test = []

[dependencies]
alloy-primitives.workspace = true
alloy-json-abi.workspace = true
Expand Down
1 change: 1 addition & 0 deletions main/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ fn verify_valid_host() -> Result<()> {
Ok(())
}

#[cfg(feature="docker-test")]
#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 0f960b0

Please sign in to comment.