Skip to content

Commit

Permalink
.github/workflows: For bazel builds, upload JUnit test xml and test l…
Browse files Browse the repository at this point in the history
…ogs.
  • Loading branch information
ivucica authored Sep 17, 2024
1 parent d1b5cf7 commit f096277
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,27 @@ jobs:
run: sudo apt-get update && sudo apt-get install autoconf automake libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxext-dev libxrandr-dev libxrender-dev libasound-dev libalsaplayer-dev
- name: bazel test
run: bazel test ${{ matrix.bazel_target }}
- name: Upload test report
uses: actions/upload-artifact@v4
if: always() # Run even if the previous step fails
with:
name: junit-test-results
path: 'bazel-testlogs/**/test.xml'
# TODO: bazel-testlogs/name-of-test has also:
# * test.outputs/
# * test.outputs_manifest/
# * test.log
# * test.raw_splitlogs/
# * test.cache_status
# but they might not be worth uploading at this time.

# retention-days: 3650d # For now, don't delete explicitly, or 10yr.
- name: Upload test log
uses: actions/upload-artifact@v4
if: always() # Run even if the previous step fails
with:
name: junit-test-results
path: 'bazel-testlogs/**/test.log'

bazel_build_buildbuddy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -182,6 +203,28 @@ jobs:
env:
BUILDBUDDY_ORG_API_KEY: ${{ secrets.BUILDBUDDY_ORG_API_KEY }}

- name: Upload test report
uses: actions/upload-artifact@v4
if: always() # Run even if the previous step fails
with:
name: junit-test-results
path: 'bazel-testlogs/**/test.xml'
# TODO: bazel-testlogs/name-of-test has also:
# * test.outputs/
# * test.outputs_manifest/
# * test.log
# * test.raw_splitlogs/
# * test.cache_status
# but they might not be worth uploading at this time.

# retention-days: 3650d # For now, don't delete explicitly, or 10yr.
- name: Upload test log
uses: actions/upload-artifact@v4
if: always() # Run even if the previous step fails
with:
name: junit-test-results
path: 'bazel-testlogs/**/test.log'

- name: print ldd
run: ldd bazel-bin/util_test
continue-on-error: true

0 comments on commit f096277

Please sign in to comment.