File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ name: Build Zond
33on :
44 release :
55 types : [published]
6+ push :
7+ branches : [ "main" ]
68 pull_request :
79 branches : [ "main" ]
810
@@ -35,13 +37,12 @@ jobs:
3537 Expand-Archive -Path "npcap-sdk.zip" -DestinationPath "npcap-sdk"
3638 echo "LIB=$env:GITHUB_WORKSPACE\npcap-sdk\Lib\x64;$env:LIB" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
3739
40+ - name : Run Tests
41+ run : cargo test --workspace
42+
3843 - name : Build Release Binary
3944 run : cargo build --release
4045
41- - name : Package Windows Binary
42- if : matrix.os == 'windows-latest' && github.event_name == 'release'
43- run : |
44- powershell Compress-Archive -Path target/release/zond.exe -DestinationPath target/release/zond-windows.zip
4546
4647 - name : Package MacOS Binary
4748 if : matrix.os == 'macos-latest' && github.event_name == 'release'
7374 with :
7475 # The action automatically detects the tag from the release event
7576 files : |
76- target/release/zond-windows.zip
7777 target/release/zond-macos.zip
7878 target/release/zond-linux.tar.gz
7979 target/release/Zond_Setup.exe
Original file line number Diff line number Diff line change @@ -149,3 +149,23 @@ async fn test_privileged_discovery_netns() {
149149 Err ( e) => panic ! ( "Discovery failed: {}" , e) ,
150150 }
151151}
152+
153+ #[ test]
154+ fn test_lan_network_resolution ( ) {
155+ // Assert that the machine running the integration test has at least 1 viable interface
156+ // that resolves via our platform agnostics hooks (macOS networksetup, Linux sysfs, Windows GetIfTable2).
157+ let result = zond_common:: net:: interface:: get_lan_network ( ) ;
158+ assert ! ( result. is_ok( ) , "Expected no OS or Viability errors during interface parsing" ) ;
159+
160+ // Virtualized headless CI runners might return None here since they use virtual bridges,
161+ // but the FFI/Syscalls must execute safely regardless!
162+ println ! ( "Resolved LAN network: {:?}" , result. unwrap( ) ) ;
163+ }
164+
165+ #[ test]
166+ fn test_prioritized_interfaces_resolution ( ) {
167+ let interfaces_res = zond_common:: net:: interface:: get_prioritized_interfaces ( 10 ) ;
168+ assert ! ( interfaces_res. is_ok( ) ) ;
169+ let interfaces = interfaces_res. unwrap ( ) ;
170+ assert ! ( !interfaces. is_empty( ) , "Expected at least 1 UP, non-loopback network interface on the host natively" ) ;
171+ }
You can’t perform that action at this time.
0 commit comments