Skip to content

Commit c2135ce

Browse files
committed
Back again.
1 parent b781b12 commit c2135ce

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

.github/workflows/datachannel_echo-test.yml

+25-21
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
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
3122

3223
echo-test-server:
3324
image: ghcr.io/sipsorcery/${{ matrix.server }}-webrtc-echo
@@ -38,19 +29,24 @@ jobs:
3829
# - 8080:8080
3930
options: "--name echo-server"
4031

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+
4143
strategy:
4244
matrix:
4345
server: ["libdatachannel", "sipsorcery", "werift"]
4446
client: ["libdatachannel", "sipsorcery", "werift"]
4547

4648
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+
5450
- name: Data Channel test for server ${{ matrix.server }} and ${{ matrix.client }} client
5551
id: check_connection
5652
run: |
@@ -65,6 +61,7 @@ jobs:
6561
run: |
6662
# Store this in Redis!
6763
#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
6865
6966
# Job Description: Collates the results of the interop tests into a mark down table.
7067
collate:
@@ -79,11 +76,18 @@ jobs:
7976
echo "| Server | Client | Test Result |" > DataChannel_Echo_test_results.md
8077
echo "|--------|--------|-------------|" >> DataChannel_Echo_test_results.md
8178
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
8791
done
8892
8993
cat DataChannel_Echo_test_results.md

0 commit comments

Comments
 (0)