-
Notifications
You must be signed in to change notification settings - Fork 21
64 lines (53 loc) · 1.51 KB
/
build-and-test-in-memory.yml
File metadata and controls
64 lines (53 loc) · 1.51 KB
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
name: In-Memory VSS Server CI
on:
push:
branches: [ main ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-in-memory:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create in-memory config
run: |
mkdir -p rust/server
cat > rust/server/vss-server-config.toml <<EOF
[server_config]
host = "127.0.0.1"
port = 8080
store_type = "in_memory"
EOF
- name: Build server
run: |
cd rust
cargo build --bin server --release
- name: Start VSS server (in-memory)
run: |
cd rust
./target/release/server server/vss-server-config.toml --in-memory > vss.log 2>&1 &
- name: Wait for server
run: |
sleep 2
for i in {1..15}; do
if curl -s http://127.0.0.1:8080 > /dev/null 2>&1; then
echo "Server is up!"
exit 0
fi
echo "Waiting... ($i)"
sleep 1
done
echo "Server failed to start. Logs:"
cat rust/vss.log
exit 1
- name: Run in-memory store tests
working-directory: rust/
run: cargo test --package impls --lib -- in_memory_store::tests --nocapture
- name: Stop VSS server
if: always()
run: |
pkill -f "server/vss-server-config.toml" || true