Skip to content

Commit

Permalink
Download junit xml files from MH
Browse files Browse the repository at this point in the history
Android and raspi emit junit xml files that MH pulls from the devices and uploads to GCS.
Download those files and upload them as artifacts so the test report uploader will pick them up.
  • Loading branch information
oxve committed Aug 2, 2023
1 parent bf0f674 commit 31f63d8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/actions/on_device_tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,25 @@ runs:
--change_id "${GITHUB_SHA}" \
watch ${{ env.SESSION_ID }}
shell: bash
- name: Download ${{ matrix.platform }} Test Results
shell: bash
env:
GCS_PATH: gs://cobalt-unittest-storage/results
run: |
set -eux
gsutil -d cp "${GCS_PATH}/${SESSION_ID}.zip" .
if [[ $? -ne 0 ]]; then
warn="Unable to download results from ${GCS_PATH}/${SESSION_ID}.zip"
echo "::warning title=No unit test results::$warn"
exit 0
fi
mkdir -p unit-test-results/${{ matrix.platform }}/${{ matrix.shard }}/
unzip ${SESSION_ID}.zip -d unit-test-results/${{ matrix.platform }}/${{ matrix.shard }}/
- name: Archive Unit Test Results
uses: actions/upload-artifact@v3
# TODO: Should only run for unit-tests
if: always()
with:
name: unit-test-results
path: unit-test-results/
2 changes: 2 additions & 0 deletions .github/workflows/unit_test_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Upload Unit Test Results
on:
workflow_run:
workflows:
- android
- evergreen
- linux
- raspi
- win32
types:
- completed
Expand Down

0 comments on commit 31f63d8

Please sign in to comment.