Skip to content

Commit 32d909e

Browse files
committed
Use temp file instead of envvar.
1 parent 42dc19f commit 32d909e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/datachannel_echo-test.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
options: "--name echo-server"
3333

3434
steps:
35-
- name: Set up result array
36-
run: echo "RESULTS=[]" >> $GITHUB_ENV
35+
- name: Set up result file
36+
run: echo "" > results.txt # Create or empty the results file
3737

3838
- name: Data Channel test for server ${{ matrix.server }} and ${{ matrix.client }} client
3939
id: check_connection
@@ -47,7 +47,8 @@ jobs:
4747
- name: Record result
4848
run: |
4949
echo "Result for ${{ matrix.server }} server and ${{ matrix.client }} client, outcome ${{ steps.check_connection.outcome }}, result ${{ steps.check_connection.outputs.TEST_RESULT }}."
50-
echo "RESULTS+=['${{ matrix.server }}','${{ matrix.client }}','${{ steps.check_connection.outputs.TEST_RESULT }}']" >> $GITHUB_ENV
50+
echo "${{ matrix.server }},${{ matrix.client }},${{ steps.check_connection.outputs.TEST_RESULT }}" >> results.txt # Append result to the file
51+
cat results.txt
5152
5253
# Job Description: Collates the results of the interop tests into a mark down table.
5354
collate:
@@ -57,18 +58,17 @@ jobs:
5758
- uses: actions/checkout@v2
5859
with:
5960
ref: testresults
60-
- name: Create results file from environment variable
61+
- name: Create results file from results.txt
6162
run: |
6263
echo "Collating results from ${{ env.RESULTS }}."
6364
echo "| Server | Client | Test Result |" > DataChannel_Echo_test_results.md
6465
echo "|--------|--------|-------------|" >> DataChannel_Echo_test_results.md
6566
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
70-
echo "| ${result[0]} | ${result[1]} | ${result[2]} |" >> DataChannel_Echo_test_results.md
71-
done
67+
# Read results from the results.txt file
68+
while IFS=',' read -r server client result; do
69+
echo "| $server | $client | $result |" >> DataChannel_Echo_test_results.md
70+
done < results.txt
71+
7272
cat DataChannel_Echo_test_results.md
7373
- name: Commit the results to the git repository
7474
if: github.event_name != 'pull_request'

0 commit comments

Comments
 (0)