Skip to content

Commit 42dc19f

Browse files
committed
Env var for results, try again 3.
1 parent aa9de79 commit 42dc19f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/datachannel_echo-test.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
steps:
3535
- name: Set up result array
3636
run: echo "RESULTS=[]" >> $GITHUB_ENV
37+
3738
- name: Data Channel test for server ${{ matrix.server }} and ${{ matrix.client }} client
3839
id: check_connection
3940
run: |
@@ -42,14 +43,11 @@ jobs:
4243
echo "Check connection for ${{ matrix.server }} server and ${{ matrix.client }} client result $result."
4344
echo "::set-output name=TEST_RESULT::$result"
4445
continue-on-error: true
46+
4547
- name: Record result
4648
run: |
4749
echo "Result for ${{ matrix.server }} server and ${{ matrix.client }} client, outcome ${{ steps.check_connection.outcome }}, result ${{ steps.check_connection.outputs.TEST_RESULT }}."
48-
# echo "${{ matrix.server }},${{ matrix.client }},${{ steps.check_connection.outputs.TEST_RESULT }}" >> ${{ matrix.server }}_${{ matrix.client }}_result.csv
49-
# Append the result to the environment variable
5050
echo "RESULTS+=['${{ matrix.server }}','${{ matrix.client }}','${{ steps.check_connection.outputs.TEST_RESULT }}']" >> $GITHUB_ENV
51-
echo "GITHUB_ENV=${GITHUB_ENV}"
52-
echo "env.RESULTS=${{ env.RESULTS }}"
5351
5452
# Job Description: Collates the results of the interop tests into a mark down table.
5553
collate:
@@ -61,10 +59,14 @@ jobs:
6159
ref: testresults
6260
- name: Create results file from environment variable
6361
run: |
64-
echo "Collating results..."
62+
echo "Collating results from ${{ env.RESULTS }}."
6563
echo "| Server | Client | Test Result |" > DataChannel_Echo_test_results.md
6664
echo "|--------|--------|-------------|" >> DataChannel_Echo_test_results.md
67-
for result in ${{ env.RESULTS }}; do
65+
66+
# Read from the RESULTS environment variable
67+
echo "Collecting results..."
68+
IFS=',' read -r -a results_array <<< "${{ env.RESULTS }}"
69+
for result in "${results_array[@]}"; do
6870
echo "| ${result[0]} | ${result[1]} | ${result[2]} |" >> DataChannel_Echo_test_results.md
6971
done
7072
cat DataChannel_Echo_test_results.md

0 commit comments

Comments
 (0)