Skip to content

Commit af24e71

Browse files
committed
Try storing tests results in envvar.
1 parent 56a46c7 commit af24e71

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/datachannel_echo-test.yml

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

3434
steps:
35+
- name: Set up result array
36+
run: echo "RESULTS=[]" >> $GITHUB_ENV
3537
- name: Data Channel test for server ${{ matrix.server }} and ${{ matrix.client }} client
3638
id: check_connection
3739
run: |
@@ -43,7 +45,9 @@ jobs:
4345
- name: Record result
4446
run: |
4547
echo "Result for ${{ matrix.server }} server and ${{ matrix.client }} client, outcome ${{ steps.check_connection.outcome }}, result ${{ steps.check_connection.outputs.TEST_RESULT }}."
46-
echo "${{ matrix.server }},${{ matrix.client }},${{ steps.check_connection.outputs.TEST_RESULT }}" >> ${{ matrix.server }}_${{ matrix.client }}_result.csv
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
50+
echo "RESULTS+=['${{ matrix.server }}','${{ matrix.client }}','${{ steps.check_connection.outputs.TEST_RESULT }}']" >> $GITHUB_ENV
4751
- name: Upload result
4852
uses: actions/upload-artifact@v4
4953
with:
@@ -59,28 +63,15 @@ jobs:
5963
- uses: actions/checkout@v2
6064
with:
6165
ref: testresults
62-
- uses: actions/setup-python@v2
63-
with:
64-
python-version: "3.x"
65-
- name: Download results
66-
uses: actions/download-artifact@v4
67-
with:
68-
overwrite: true
69-
name: results
70-
- name: Collate result files
66+
- name: Create results file from environment variable
7167
run: |
72-
python --version
73-
pip install 'weasyprint==52.4'
74-
python test/collate-results.py DataChannel_Echo
75-
python test/collate-results.py > DataChannel_Echo_test_results.md
76-
cat DataChannel_Echo_test_results.md
77-
- name: Azure CLI script to upload results to Azure blob storage
78-
if: github.event_name != 'pull_request'
79-
uses: azure/CLI@v1
80-
with:
81-
inlineScript: |
82-
az storage blob upload --account-name webrtctestresults --container-name githubactions --name DataChannel_Echo_test_results.md --file DataChannel_Echo_test_results.md --account-key ${{ secrets.Azure_Key }} --overwrite
83-
az storage blob upload --account-name webrtctestresults --container-name githubactions --name DataChannel_Echo_test_results.png --file DataChannel_Echo_test_results.png --account-key ${{ secrets.Azure_Key }} --overwrite
68+
echo "Collating results..."
69+
echo "| Server | Client | Test Result |" > results.md
70+
echo "|--------|--------|-------------|" >> results.md
71+
for result in ${{ env.RESULTS }}; do
72+
echo "| ${result[0]} | ${result[1]} | ${result[2]} |" >> results.md
73+
done
74+
cat results.md
8475
- name: Commit the results to the git repository
8576
if: github.event_name != 'pull_request'
8677
run: |

0 commit comments

Comments
 (0)