Skip to content

Commit 9542b95

Browse files
committed
ci: retry transient Rust network integration tests
1 parent 6c51ed9 commit 9542b95

6 files changed

Lines changed: 51 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,50 @@ jobs:
6464
working-directory: netsu-rs
6565
- run: cargo clippy --all-targets -- -D warnings
6666
working-directory: netsu-rs
67-
- run: cargo test
67+
- name: Test Rust suite (retry transient network failures)
6868
working-directory: netsu-rs
69+
shell: bash
70+
run: |
71+
for attempt in 1 2 3; do
72+
if cargo test; then
73+
exit 0
74+
fi
75+
if [ "$attempt" -eq 3 ]; then
76+
exit 1
77+
fi
78+
echo "cargo test failed on attempt $attempt; retrying"
79+
done
6980
- run: cargo clippy --all-targets --features quic -- -D warnings
7081
working-directory: netsu-rs
71-
- run: cargo test --features quic
82+
- name: Test Rust QUIC feature (retry transient network failures)
7283
working-directory: netsu-rs
84+
shell: bash
85+
run: |
86+
for attempt in 1 2 3; do
87+
if cargo test --features quic; then
88+
exit 0
89+
fi
90+
if [ "$attempt" -eq 3 ]; then
91+
exit 1
92+
fi
93+
echo "cargo test --features quic failed on attempt $attempt; retrying"
94+
done
7395
- name: Clippy (WebRTC feature)
7496
run: cargo clippy --locked --all-targets --features webrtc -- -D warnings
7597
working-directory: netsu-rs
7698
- name: Test (WebRTC feature)
77-
run: cargo test --locked --features webrtc
7899
working-directory: netsu-rs
100+
shell: bash
101+
run: |
102+
for attempt in 1 2 3; do
103+
if cargo test --locked --features webrtc; then
104+
exit 0
105+
fi
106+
if [ "$attempt" -eq 3 ]; then
107+
exit 1
108+
fi
109+
echo "cargo test --locked --features webrtc failed on attempt $attempt; retrying"
110+
done
79111
# Catch packaging breakage (bad metadata, an excluded file a build needs)
80112
# before a release cuts, mirroring the jsr dry-run above.
81113
- run: cargo publish --dry-run

‎.github/workflows/publish.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,19 @@ jobs:
6666
working-directory: netsu-rs
6767
- run: cargo clippy --all-targets -- -D warnings
6868
working-directory: netsu-rs
69-
- run: cargo test
69+
- name: Test Rust suite (retry transient network failures)
7070
working-directory: netsu-rs
71+
shell: bash
72+
run: |
73+
for attempt in 1 2 3; do
74+
if cargo test; then
75+
exit 0
76+
fi
77+
if [ "$attempt" -eq 3 ]; then
78+
exit 1
79+
fi
80+
echo "cargo test failed on attempt $attempt; retrying"
81+
done
7182
- run: cargo publish
7283
working-directory: netsu-rs
7384
env:

‎netsu-rs/Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎netsu-rs/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "netsu"
3-
version = "0.2.5"
3+
version = "0.2.6"
44
edition = "2024"
55
license = "MIT"
66
description = "iperf3-compatible network speed test — library and CLI"

‎packages/netsu/jsr.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hk/netsu",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"license": "MIT",
55
"exports": "./src/index.ts"
66
}

‎packages/netsu/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "netsu",
33
"type": "module",
4-
"version": "0.2.5",
4+
"version": "0.2.6",
55
"description": "iperf3-compatible network speed test — library and CLI",
66
"author": "Huakun Shen <huakun.shen@huakunshen.com>",
77
"license": "MIT",

0 commit comments

Comments
 (0)