Skip to content

Commit f05b121

Browse files
committed
test workflow
1 parent f74543e commit f05b121

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/check-ios-android-bindings.yml

+5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
- main
66
pull_request:
77
paths:
8+
- "*"
89
- "bindings_ffi/**"
910
- "Cargo.toml"
1011
- "Cargo.lock"
12+
- "dev/**"
13+
- "rust-toolchain"
14+
- ".cargo/**"
1115
jobs:
1216
check-swift:
1317
runs-on: warp-macos-13-arm64-6x
@@ -49,6 +53,7 @@ jobs:
4953
# We can add other targets later by making a pkg derivation and configuring LD_LIBRARY_PATH
5054
# according to https://github.com/bburdette/tauri-zknotes/blob/7aa3495dc2c8a266d81c2fa3e51ae347e9c2597d/flake.nix#L158
5155
# but this is good for just checking to ensure it compiles on this target
56+
# Can also run android emulator here after cloning xmtp-android
5257
steps:
5358
- name: Checkout
5459
uses: actions/checkout@v4

bindings_ffi/src/logger.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ mod ios {
5151
let libxmtp_filter = EnvFilter::builder()
5252
.parse(FILTER_DIRECTIVE)
5353
.unwrap_or_else(|_| EnvFilter::new("info"));
54-
5554
let subsystem = format!("org.xmtp.{}", env!("CARGO_PKG_NAME"));
56-
5755
OsLogger::new(subsystem, "default").with_filter(libxmtp_filter)
5856
}
5957
}
@@ -104,11 +102,19 @@ pub use test_logger::*;
104102
#[cfg(test)]
105103
mod test_logger {
106104
use super::*;
105+
use tracing_subscriber::EnvFilter;
107106

108107
pub fn native_layer<S>() -> impl Layer<S>
109108
where
110109
S: Subscriber + for<'a> LookupSpan<'a>,
111110
{
112111
xmtp_common::logger_layer()
113112
}
113+
114+
#[test]
115+
fn test_directive() {
116+
let _filer = EnvFilter::builder()
117+
.parse(FILTER_DIRECTIVE)
118+
.expect("should parse correctly");
119+
}
114120
}

0 commit comments

Comments
 (0)