19
19
runs-on : ubuntu-latest
20
20
21
21
services :
22
- redis :
23
- image : redis:alpine
24
- ports :
25
- - 6379:6379
26
- options : >-
27
- --health-cmd "redis-cli ping"
28
- --health-interval 10s
29
- --health-timeout 5s
30
- --health-retries 5
31
22
32
23
echo-test-server :
33
24
image : ghcr.io/sipsorcery/${{ matrix.server }}-webrtc-echo
@@ -38,19 +29,24 @@ jobs:
38
29
# - 8080:8080
39
30
options : " --name echo-server"
40
31
32
+ outputs :
33
+ result_libdatachannel_libdatachannel : ${{ steps.set-output.outputs.result_libdatachannel_libdatachannel }}
34
+ result_libdatachannel_sipsorcery : ${{ steps.set-output.outputs.result_libdatachannel_sipsorcery }}
35
+ result_libdatachannel_werift : ${{ steps.set-output.outputs.result_libdatachannel_werift }}
36
+ result_sipsorcery_libdatachannel : ${{ steps.set-output.outputs.result_sipsorcery_libdatachannel }}
37
+ result_sipsorcery_sipsorcery : ${{ steps.set-output.outputs.result_sipsorcery_sipsorcery }}
38
+ result_sipsorcery_werift : ${{ steps.set-output.outputs.result_sipsorcery_werift }}
39
+ result_werift_libdatachannel : ${{ steps.set-output.outputs.result_werift_libdatachannel }}
40
+ result_werift_sipsorcery : ${{ steps.set-output.outputs.result_werift_sipsorcery }}
41
+ result_werift_werift : ${{ steps.set-output.outputs.result_werift_werift }}
42
+
41
43
strategy :
42
44
matrix :
43
45
server : ["libdatachannel", "sipsorcery", "werift"]
44
46
client : ["libdatachannel", "sipsorcery", "werift"]
45
47
46
48
steps :
47
-
48
- - name : Wait for Redis to be ready
49
- run : |
50
- for i in {1..30}; do
51
- redis-cli -h 127.0.0.1 ping && break || sleep 1;
52
- done
53
-
49
+
54
50
- name : Data Channel test for server ${{ matrix.server }} and ${{ matrix.client }} client
55
51
id : check_connection
56
52
run : |
65
61
run : |
66
62
# Store this in Redis!
67
63
#result_entry="${{ matrix.server }},${{ matrix.client }},${{ steps.check_connection.outputs.TEST_RESULT }}"
64
+ echo "result_${{ matrix.server }}_${{ matrix.client }}=${{ steps.check_connection.outputs.TEST_RESULT }}" >> $GITHUB_OUTPUT
68
65
69
66
# Job Description: Collates the results of the interop tests into a mark down table.
70
67
collate :
@@ -79,11 +76,18 @@ jobs:
79
76
echo "| Server | Client | Test Result |" > DataChannel_Echo_test_results.md
80
77
echo "|--------|--------|-------------|" >> DataChannel_Echo_test_results.md
81
78
82
- # Read results from the job output
83
- IFS=' ' read -r -a results_array <<< "${{ needs.interop-tests.outputs.results }}"
84
- for result in "${results_array[@]}"; do
85
- IFS=',' read -r server client test_result <<< "$result"
86
- echo "| $server | $client | $test_result |" >> DataChannel_Echo_test_results.md
79
+
80
+ # Define the server and client combinations
81
+ servers=("libdatachannel" "sipsorcery" "werift")
82
+ clients=("libdatachannel" "sipsorcery" "werift")
83
+
84
+ # Loop through server and client combinations to get results
85
+ for server in "${servers[@]}"; do
86
+ for client in "${clients[@]}"; do
87
+ result_key="result_${server}_${client}"
88
+ result_value="${{ needs.interop-tests.outputs[result_key] }}"
89
+ echo "| ${server} | ${client} | ${result_value} |" >> DataChannel_Echo_test_results.md
90
+ done
87
91
done
88
92
89
93
cat DataChannel_Echo_test_results.md
0 commit comments