From 022cc59d563013facc1dc6890e9d416adb6e4274 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Thu, 12 Sep 2024 07:09:15 +0100 Subject: [PATCH] Try uploading test results to Codecov. (#3266) --- .github/workflows/integration-tests.yml | 10 ++++++++++ .github/workflows/ui_tests.yml | 12 +++++++++++- .github/workflows/unit_tests.yml | 13 +++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 53ca8397ee..099e7c509a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -70,3 +70,13 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} flags: integrationtests + - name: Collect test results + if: ${{ !cancelled() }} + run: xcresultparser -q -o junit -p $(pwd) fastlane/test_output/IntegrationTests.xcresult > fastlane/test_output/integration-junit.xml + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: integrationtests diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 79604257ea..8a02b401a4 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -67,4 +67,14 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} flags: uitests - + + - name: Collect test results + if: ${{ !cancelled() }} + run: xcresultparser -q -o junit -p $(pwd) fastlane/test_output/UITests.xcresult > fastlane/test_output/ui-junit.xml + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: uitests diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 32120d0d3a..0bd995d168 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -65,3 +65,16 @@ jobs: fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} flags: unittests + + - name: Collect test results + if: ${{ !cancelled() }} + run: | + xcresultparser -q -o junit -p $(pwd) fastlane/test_output/UnitTests.xcresult > fastlane/test_output/unit-junit.xml + xcresultparser -q -o junit -p $(pwd) fastlane/test_output/PreviewTests.xcresult > fastlane/test_output/preview-junit.xml + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests