diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000000000..e20701e3d9258 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,52 @@ +name: 'Test Report' +on: + workflow_run: + workflows: [ + 'test unit tests and sitl building', + 'test blimp', + 'test plane', + 'test rover', + 'test sub', + 'test tracker', + 'test copter' ] # runs after CI workflow + types: + - completed + +permissions: + contents: read + actions: read + checks: write + +jobs: + report: + runs-on: ubuntu-latest +# strategy: +# fail-fast: false # don't cancel if a job from the matrix fails +# matrix: +# config: [ +# sitltest-plane, +# sitltest-quadplane, +# sitltest-copter-tests1a, +# sitltest-copter-tests1b, +# sitltest-copter-tests1c, +# sitltest-copter-tests1d, +# sitltest-copter-tests1e, +# sitltest-copter-tests2a, +# sitltest-copter-tests2b, +# sitltest-heli, +# sitltest-blimp, +# sitltest-rover, +# sitltest-sailboat, +# sitltest-balancebot, +# sitltest-sub, +# sitltest-tracker, +# base-unit-tests, +# ] + + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: /test-results-junit-(.*)/ # artifact name + name: Tests Report $1 # Name of the check run which will be created + path: '*.xml' # Path to test results (inside artifact .zip) + reporter: java-junit # Format of test results diff --git a/.github/workflows/test_sitl_blimp.yml b/.github/workflows/test_sitl_blimp.yml index b346efdcbe699..ba32da000d9c9 100644 --- a/.github/workflows/test_sitl_blimp.yml +++ b/.github/workflows/test_sitl_blimp.yml @@ -268,3 +268,9 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_sitl_copter.yml b/.github/workflows/test_sitl_copter.yml index c2133a5a1d499..681fdf31698a3 100644 --- a/.github/workflows/test_sitl_copter.yml +++ b/.github/workflows/test_sitl_copter.yml @@ -272,6 +272,13 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 + build-gcc-heli: runs-on: ubuntu-22.04 container: @@ -367,3 +374,10 @@ jobs: name: BIN-${{matrix.config}} path: /__w/ardupilot/ardupilot/logs retention-days: 7 + + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_sitl_plane.yml b/.github/workflows/test_sitl_plane.yml index 66bb9a7ebf3b1..1e5e369fbfaf5 100644 --- a/.github/workflows/test_sitl_plane.yml +++ b/.github/workflows/test_sitl_plane.yml @@ -268,3 +268,9 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_sitl_rover.yml b/.github/workflows/test_sitl_rover.yml index a6f3d669b3276..23c82ccfcca70 100644 --- a/.github/workflows/test_sitl_rover.yml +++ b/.github/workflows/test_sitl_rover.yml @@ -268,3 +268,9 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_sitl_sub.yml b/.github/workflows/test_sitl_sub.yml index cbe5aaddf1b02..5f8d6d9470461 100644 --- a/.github/workflows/test_sitl_sub.yml +++ b/.github/workflows/test_sitl_sub.yml @@ -269,3 +269,9 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_sitl_tracker.yml b/.github/workflows/test_sitl_tracker.yml index 8191e57483bf5..8376887e9ea25 100644 --- a/.github/workflows/test_sitl_tracker.yml +++ b/.github/workflows/test_sitl_tracker.yml @@ -269,3 +269,9 @@ jobs: path: /__w/ardupilot/ardupilot/logs retention-days: 7 + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1 diff --git a/.github/workflows/test_unit_tests.yml b/.github/workflows/test_unit_tests.yml index 02b174336f945..ce9d868e146e7 100644 --- a/.github/workflows/test_unit_tests.yml +++ b/.github/workflows/test_unit_tests.yml @@ -155,3 +155,10 @@ jobs: name: fail-${{ matrix.toolchain }}-${{matrix.config}} path: /tmp/buildlogs retention-days: 14 + + - uses: actions/upload-artifact@v3 # upload test results + if: success() || failure() # run this step even if previous step failed + with: + name: test-results-junit-${{ matrix.toolchain }}-${{matrix.config}} + path: /__w/ardupilot/ardupilot/autotest_result_*_junit.xml + retention-days: 1