From a2cd3d6872795cb03f7710c99f78011af86c40b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20S=C3=B8e-Knudsen?= <41109954+urrsk@users.noreply.github.com> Date: Thu, 6 Feb 2025 09:45:02 +0100 Subject: [PATCH 1/3] Add codecov/test-results-action --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3ac1dae8..04d8036a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,6 +62,11 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Generate URSim log files if: always() run: | From 145cc0a466581f4a50f70472ae2078189a20b1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20S=C3=B8e-Knudsen?= <41109954+urrsk@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:24:30 +0100 Subject: [PATCH 2/3] Add ctest to make a junit.xml for codecov --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04d8036a5..41726c3c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,12 @@ jobs: - name: Create folder for test artifacts run: mkdir -p test_artifacts - name: test - run: cd build && ctest --output-on-failure + run: cd build && ctest --output-on-failure --output-junit junit.xml + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: run examples run: ./run_examples.sh "192.168.56.101" 1 - name: install gcovr @@ -62,11 +67,6 @@ jobs: with: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - - name: Upload test results to Codecov - if: ${{ !cancelled() }} - uses: codecov/test-results-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: Generate URSim log files if: always() run: | From ada66e4b1168a24b5b8205d1e47f3a547c497509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20S=C3=B8e-Knudsen?= <41109954+urrsk@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:53:28 +0100 Subject: [PATCH 3/3] Update .github/workflows/ci.yml Co-authored-by: Felix Exner --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41726c3c8..76d9ad67e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,7 @@ jobs: uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true - name: run examples run: ./run_examples.sh "192.168.56.101" 1 - name: install gcovr