-
Notifications
You must be signed in to change notification settings - Fork 127
97 lines (84 loc) · 2.96 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
name: Test, Prop Tests, Example Tests
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
steps:
- name: Install stable toolchain & components
uses: actions/checkout@v4
with:
profile: minimal
toolchain: nightly
override: true
- name: Build
run: |
cargo build --manifest-path=benches/Cargo.toml
cargo build --manifest-path=common/Cargo.toml
cargo build --manifest-path=protocols/Cargo.toml
cargo build --manifest-path=roles/Cargo.toml
cargo build --manifest-path=utils/Cargo.toml
- name: Roles Integration Tests
run: |
cargo test --manifest-path=roles/Cargo.toml --verbose --test '*' -- --nocapture
- name: Run sv1-client-and-server example
run: |
cargo run --manifest-path=examples/sv1-client-and-server/Cargo.toml --bin client_and_server -- 60
- name: interop-test
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then
./run.sh 30
else
echo "Skipping interop-test on ${{ matrix.os }} - not supported"
fi
working-directory: examples/interop-cpp/
# TODO this is only usefull if we want to build c bindings with guix
#- name: interop-no-cargo-test
# run: |
# if [ ${{ matrix.os }} == "ubuntu-latest" ]; then
# ./run.sh 30
# else
# echo "Skipping interop-test on ${{ matrix.os }} - not supported"
# fi
# working-directory: examples/interop-cpp-no-cargo/
- name: fuzz tests
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then
./run.sh 30
else
echo "Skipping fuzz test on ${{ matrix.os }} - not supported"
fi
working-directory: utils/buffer/fuzz
- name: Test
run: |
cargo test --manifest-path=benches/Cargo.toml
cargo test --manifest-path=common/Cargo.toml
cargo test --manifest-path=protocols/Cargo.toml
cargo test --manifest-path=roles/Cargo.toml
cargo test --manifest-path=utils/Cargo.toml
- name: Property based testing
run: |
cargo test --manifest-path=protocols/Cargo.toml --features prop_test
- name: Run ping-pong-with-noise example
run: |
cargo run --manifest-path=examples/ping-pong-with-noise/Cargo.toml --bin ping_pong_with_noise -- 10
- name: Run ping-pong-without-noise example
run: |
cargo run --manifest-path=examples/ping-pong-without-noise/Cargo.toml --bin ping_pong_without_noise -- 10