Skip to content

Commit

Permalink
Try saving output, uploading, reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Sep 18, 2024
1 parent e1092e0 commit 3e05499
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ jobs:
working-directory: build
run: |
ctest --parallel 2 --timeout 180 --output-on-failure \
--test-output-size-passed=65536 --test-output-size-failed=1048576
--output-junit test-results.junit.xml \
--test-output-size-passed 16384 --test-output-size-failed 1048576
- name: Install Celeritas
working-directory: build
run: |
Expand All @@ -115,5 +116,13 @@ jobs:
export LDFLAGS=-Wl,--no-as-needed ${LDFLAGS}
fi
./scripts/ci/test-examples.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{matrix.image}}-${{env.CMAKE_PRESET}}
path: "build/test-results.junit.xml"
if-no-files-found: error
retention-days: 1

# vim: set nowrap tw=100:
11 changes: 10 additions & 1 deletion .github/workflows/build-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ jobs:
- name: Run tests
working-directory: build
run: |
ctest --parallel $(nproc) --timeout 15 --output-on-failure
ctest --parallel $(nproc) --timeout 15 --output-on-failure \
--output-junit test-results.junit.xml \
- name: Install
working-directory: build
run: |
Expand All @@ -81,5 +82,13 @@ jobs:
if: ${{!cancelled()}}
run: |
ccache -s
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-fast-${{matrix.compiler}}-${{matrix.version}}
path: "build/test-results.junit.xml"
if-no-files-found: error
retention-days: 1

# vim: set nowrap tw=100:
28 changes: 28 additions & 0 deletions .github/workflows/report-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: report-test

on:
workflow_run:
workflows: ["pull_request"]
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
report-tests:
permissions:
checks: write
statuses: write
runs-on: ubuntu-latest
steps:
- uses: dorny/test-reporter@v1
with:
artifact: "/test-results-fast-([^-]+)-(.*)/"
name: "$2 ($1) test results"
path: "**/*.xml"
reporter: java-junit

# vim: set nowrap tw=100:
2 changes: 1 addition & 1 deletion scripts/ci/run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ cd build
ctest -T Test \
-j16 --timeout 180 \
--no-compress-output --output-on-failure \
--test-output-size-passed=65536 --test-output-size-failed=1048576 \
--test-output-size-passed 65536 --test-output-size-failed 1048576
# List XML files generated: jenkins will upload these later
find Testing -name '*.xml'

Expand Down

0 comments on commit 3e05499

Please sign in to comment.