From 1fd39c2a340a581d55aa66983bbfec7eb8933f55 Mon Sep 17 00:00:00 2001 From: Cesar Date: Thu, 12 Feb 2026 17:20:44 +0100 Subject: [PATCH 01/16] feat: enables runtime coverage for services that run in containers --- .github/workflows/go_app_pull_requests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 1651b9b..e76bab6 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -176,11 +176,13 @@ jobs: name: junit-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Integration tests (conditional, per-module) + # INTEGRATION_COVERAGE=true enables runtime coverage collection for services + # that run in Docker containers (e.g., testcontainers-based tests) - name: integration tests if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + INTEGRATION_COVERAGE=true go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ | tee integration_test_output.txt - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} From f7da1260400c5f86ff03d0d8d80d582d03a5da43 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 13 Feb 2026 10:14:29 +0100 Subject: [PATCH 02/16] chore: merge both reports to send to codecov --- .github/workflows/go_app_pull_requests.yml | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index e76bab6..df3f44c 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -207,10 +207,27 @@ jobs: - name: build coverage.txt working-directory: ${{ matrix.module }} run: | - if [ -d coverage/int ] && [ "$(ls -A coverage/int)" ]; then - go tool covdata textfmt -i=./coverage/int,./coverage/unit -o coverage.txt - else + HAS_UNIT=false + HAS_INT=false + if [ -d coverage/unit ] && [ "$(ls -A coverage/unit 2>/dev/null)" ]; then + HAS_UNIT=true + fi + if [ -d coverage/int ] && [ "$(ls -A coverage/int 2>/dev/null)" ]; then + HAS_INT=true + fi + + if [ "$HAS_UNIT" = true ] && [ "$HAS_INT" = true ]; then + echo "Combining unit and integration coverage" + go tool covdata textfmt -i=./coverage/unit,./coverage/int -o coverage.txt + elif [ "$HAS_UNIT" = true ]; then + echo "Using unit coverage only" go tool covdata textfmt -i=./coverage/unit -o coverage.txt + elif [ "$HAS_INT" = true ]; then + echo "Using integration coverage only" + go tool covdata textfmt -i=./coverage/int -o coverage.txt + else + echo "No coverage data found" + echo "mode: set" > coverage.txt fi - name: Upload test coverage results to Codecov uses: codecov/codecov-action@v4 From 6cd40afd37e06b29f64e9f899f2b0652722fdf09 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 13 Feb 2026 10:21:35 +0100 Subject: [PATCH 03/16] chore: including go integration test result --- .github/workflows/go_app_pull_requests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index df3f44c..36b0525 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -176,14 +176,16 @@ jobs: name: junit-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Integration tests (conditional, per-module) - # INTEGRATION_COVERAGE=true enables runtime coverage collection for services - # that run in Docker containers (e.g., testcontainers-based tests) + # Coverage is collected from two sources: + # 1. Go integration tests running in-process (via -cover and -test.gocoverdir) + # 2. Services running in Docker containers (via INTEGRATION_COVERAGE=true env var) - name: integration tests if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - INTEGRATION_COVERAGE=true go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ - | tee integration_test_output.txt + INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ + 2>&1 | tee integration_test_output.txt - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} From c7e4861cf669e4f0cdd7882fabd2109670e3b2dc Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 13 Feb 2026 11:28:47 +0100 Subject: [PATCH 04/16] chore: fix --- .github/workflows/go_app_pull_requests.yml | 54 ++++++++++++---------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 36b0525..bdecc1d 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -151,11 +151,11 @@ jobs: run: | mkdir -p ${{ matrix.module }}/coverage/unit mkdir -p ${{ matrix.module }}/coverage/int - # Run unit tests for the module. + # Run unit tests with race detector and coverage - name: go test working-directory: ${{ matrix.module }} run: | - go test -cover --race -v ${{ inputs.GO_TEST_UNIT_TAGS }} ./... \ + go test -cover -race -v ${{ inputs.GO_TEST_UNIT_TAGS }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/unit" \ 2>&1 | tee unit_test_output.txt - name: Build Unit Test Junit report @@ -205,39 +205,45 @@ jobs: files: ${{ matrix.module }}/junit_integration_report.xml name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} - # Coverage handling - - name: build coverage.txt + # Coverage handling - upload unit and integration separately + # (they use different coverage modes: atomic vs set, so can't be combined locally) + # Codecov will merge them automatically + - name: build unit coverage working-directory: ${{ matrix.module }} run: | - HAS_UNIT=false - HAS_INT=false if [ -d coverage/unit ] && [ "$(ls -A coverage/unit 2>/dev/null)" ]; then - HAS_UNIT=true + echo "Converting unit coverage to text format" + go tool covdata textfmt -i=./coverage/unit -o coverage-unit.txt + else + echo "No unit coverage data found" fi + - name: build integration coverage + working-directory: ${{ matrix.module }} + run: | if [ -d coverage/int ] && [ "$(ls -A coverage/int 2>/dev/null)" ]; then - HAS_INT=true - fi - - if [ "$HAS_UNIT" = true ] && [ "$HAS_INT" = true ]; then - echo "Combining unit and integration coverage" - go tool covdata textfmt -i=./coverage/unit,./coverage/int -o coverage.txt - elif [ "$HAS_UNIT" = true ]; then - echo "Using unit coverage only" - go tool covdata textfmt -i=./coverage/unit -o coverage.txt - elif [ "$HAS_INT" = true ]; then - echo "Using integration coverage only" - go tool covdata textfmt -i=./coverage/int -o coverage.txt + echo "Converting integration coverage to text format" + go tool covdata textfmt -i=./coverage/int -o coverage-int.txt else - echo "No coverage data found" - echo "mode: set" > coverage.txt + echo "No integration coverage data found" fi - - name: Upload test coverage results to Codecov + - name: Upload unit test coverage to Codecov + if: ${{ hashFiles(format('{0}/coverage-unit.txt', matrix.module)) != '' }} uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ${{ matrix.module }}/coverage.txt + files: ${{ matrix.module }}/coverage-unit.txt + flags: unit verbose: true - fail_ci_if_error: true # optional (default = false) + fail_ci_if_error: false + - name: Upload integration test coverage to Codecov + if: ${{ hashFiles(format('{0}/coverage-int.txt', matrix.module)) != '' }} + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ${{ matrix.module }}/coverage-int.txt + flags: integration + verbose: true + fail_ci_if_error: false docker-build: # # ensures the docker image will build without pushing to the registry From 5e9bac29aaab00fe087842a5a7d630842ef4f2d7 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 17 Apr 2026 16:56:53 +0200 Subject: [PATCH 05/16] feat: include integration test suite junit report --- .github/workflows/go_app_pull_requests.yml | 21 +++++++++++++++++++++ .github/workflows/go_app_push_main.yml | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index bdecc1d..5f660d0 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -26,6 +26,11 @@ on: description: "The duration before tests are stopped" type: string default: "10m" + EXTRA_JUNIT_REPORT: + description: "Path to an additional JUnit XML report (e.g., from Python integration tests). Relative to the module directory." + type: string + required: false + default: "" secrets: GH_CI_PAT: description: 'Token password for GitHub auth' @@ -205,6 +210,22 @@ jobs: files: ${{ matrix.module }}/junit_integration_report.xml name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} + # Extra JUnit report (e.g., from Python integration tests running inside Docker) + - name: Extra Test Report + if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: dorny/test-reporter@v1 + with: + name: Extra Test Report (${{ matrix.module }}) + path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + reporter: java-junit + - name: Upload extra test results to Codecov + if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: codecov/test-results-action@v1 + with: + fail_ci_if_error: false + files: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + name: junit-extra-report-${{ strategy.job-index }} + token: ${{ secrets.CODECOV_TOKEN }} # Coverage handling - upload unit and integration separately # (they use different coverage modes: atomic vs set, so can't be combined locally) # Codecov will merge them automatically diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index b8081cf..696db3c 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -27,6 +27,11 @@ on: description: "The duration before tests are stopped" type: string default: "10m" + EXTRA_JUNIT_REPORT: + description: "Path to an additional JUnit XML report (e.g., from Python integration tests). Relative to the module directory." + type: string + required: false + default: "" secrets: GH_CI_PAT: description: 'Token password for GitHub auth' @@ -157,6 +162,22 @@ jobs: files: ${{ matrix.module }}/junit_integration_report.xml name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} + # Extra JUnit report (e.g., from Python integration tests running inside Docker) + - name: Extra Test Report + if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: dorny/test-reporter@v1 + with: + name: Extra Test Report (${{ matrix.module }}) + path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + reporter: java-junit + - name: Upload extra test results to Codecov + if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: codecov/test-results-action@v1 + with: + fail_ci_if_error: false + files: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + name: junit-extra-report-${{ strategy.job-index }} + token: ${{ secrets.CODECOV_TOKEN }} # Coverage handling - name: build coverage.txt working-directory: ${{ matrix.module }} From 1eabf14c18db0d5ef70685ac1f94d5c50407da46 Mon Sep 17 00:00:00 2001 From: Cesar Date: Mon, 20 Apr 2026 12:18:05 +0200 Subject: [PATCH 06/16] fix: split go test from container sdterr --- .github/workflows/go_app_pull_requests.yml | 6 +++--- .github/workflows/go_app_push_main.yml | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 5f660d0..3dcf084 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -190,7 +190,7 @@ jobs: run: | INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ - 2>&1 | tee integration_test_output.txt + > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} @@ -212,14 +212,14 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - name: Extra Test Report - if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/test-results-action@v1 with: fail_ci_if_error: false diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index 696db3c..3ba094f 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -141,8 +141,9 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ - | tee integration_test_output.txt + INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ + > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} @@ -164,14 +165,14 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - name: Extra Test Report - if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/test-results-action@v1 with: fail_ci_if_error: false From f5d4e41bce632c8e1c8d6cf5a7a9844fe4b54802 Mon Sep 17 00:00:00 2001 From: Cesar Date: Mon, 20 Apr 2026 13:23:23 +0200 Subject: [PATCH 07/16] fix: prevent report from failing on mixed output --- .github/workflows/go_app_pull_requests.yml | 1 + .github/workflows/go_app_push_main.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 3dcf084..06cb8d8 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -202,6 +202,7 @@ jobs: name: Integration Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/junit_integration_report.xml reporter: java-junit + fail-on-error: 'false' - name: Upload integration test results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/test-results-action@v1 diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index 3ba094f..d02d8f4 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -154,6 +154,7 @@ jobs: with: name: Integration Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/junit_integration_report.xml + fail-on-error: 'false' reporter: java-junit - name: Upload integration test results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} From ce4fced59d000a9f7a4df4a003a6d98e9e1d427e Mon Sep 17 00:00:00 2001 From: Cesar Date: Mon, 20 Apr 2026 15:46:17 +0200 Subject: [PATCH 08/16] fix: filter python test output from report --- .github/workflows/go_app_pull_requests.yml | 4 +++- .github/workflows/go_app_push_main.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 06cb8d8..1933a4f 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -194,7 +194,9 @@ jobs: - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} - run: go-junit-report -in integration_test_output.txt -set-exit-code > junit_integration_report.xml || true + run: | + grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true + go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml || true - name: Integration Test Report uses: dorny/test-reporter@v1 if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index d02d8f4..4b39f17 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -147,7 +147,9 @@ jobs: - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} - run: go-junit-report -in integration_test_output.txt -set-exit-code > junit_integration_report.xml || true + run: | + grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true + go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml || true - name: Integration Test Report uses: dorny/test-reporter@v1 if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} From 4088a1845036028e85e14d4955463476d2c7268e Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 21 Apr 2026 15:26:13 +0200 Subject: [PATCH 09/16] fix: separate e2e tests --- .github/workflows/go_app_pull_requests.yml | 20 ++++++++++++++++++++ .github/workflows/go_app_push_main.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 1933a4f..72a1a50 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -156,6 +156,7 @@ jobs: run: | mkdir -p ${{ matrix.module }}/coverage/unit mkdir -p ${{ matrix.module }}/coverage/int + mkdir -p ${{ matrix.module }}/coverage/e2e # Run unit tests with race detector and coverage - name: go test working-directory: ${{ matrix.module }} @@ -268,6 +269,25 @@ jobs: flags: integration verbose: true fail_ci_if_error: false + - name: build e2e coverage + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + working-directory: ${{ matrix.module }} + run: | + if [ -d coverage/e2e ] && [ "$(ls -A coverage/e2e 2>/dev/null)" ]; then + echo "Converting e2e coverage to text format" + go tool covdata textfmt -i=./coverage/e2e -o coverage-e2e.txt + else + echo "No e2e coverage data found" + fi + - name: Upload e2e test coverage to Codecov + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ${{ matrix.module }}/coverage-e2e.txt + flags: e2e + verbose: true + fail_ci_if_error: false docker-build: # # ensures the docker image will build without pushing to the registry diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index 4b39f17..d396b45 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -112,6 +112,7 @@ jobs: run: | mkdir -p ${{ matrix.module }}/coverage/unit mkdir -p ${{ matrix.module }}/coverage/int + mkdir -p ${{ matrix.module }}/coverage/e2e # Run unit tests for the module. - name: go test working-directory: ${{ matrix.module }} @@ -198,6 +199,25 @@ jobs: files: ${{ matrix.module }}/coverage.txt verbose: true fail_ci_if_error: true # optional (default = false) + - name: build e2e coverage + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + working-directory: ${{ matrix.module }} + run: | + if [ -d coverage/e2e ] && [ "$(ls -A coverage/e2e 2>/dev/null)" ]; then + echo "Converting e2e coverage to text format" + go tool covdata textfmt -i=./coverage/e2e -o coverage-e2e.txt + else + echo "No e2e coverage data found" + fi + - name: Upload e2e test coverage to Codecov + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ${{ matrix.module }}/coverage-e2e.txt + flags: e2e + verbose: true + fail_ci_if_error: false release: # # Create a GitHub Release based on conventional commits. From 0a22f3d85c3c9d4d950af0513512d23e43efab07 Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 21 Apr 2026 17:20:33 +0200 Subject: [PATCH 10/16] chore: include lib too --- .github/workflows/go_lib_pull_requests.yml | 53 ++++++++++++++++++++-- .github/workflows/go_lib_push_main.yml | 53 ++++++++++++++++++++-- 2 files changed, 100 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go_lib_pull_requests.yml b/.github/workflows/go_lib_pull_requests.yml index 289b8ea..57a2e73 100644 --- a/.github/workflows/go_lib_pull_requests.yml +++ b/.github/workflows/go_lib_pull_requests.yml @@ -30,6 +30,11 @@ on: description: "The duration before tests are stopped" type: string default: "10m" + EXTRA_JUNIT_REPORT: + description: "Path to an additional JUnit XML report (e.g., from Python integration tests). Relative to the module directory." + type: string + required: false + default: "" secrets: GH_CI_PAT: description: "Token password for GitHub auth" @@ -157,6 +162,7 @@ jobs: run: | mkdir -p ${{ matrix.module }}/coverage/unit mkdir -p ${{ matrix.module }}/coverage/int + mkdir -p ${{ matrix.module }}/coverage/e2e # Run unit tests for the module. - name: go test working-directory: ${{ matrix.module }} @@ -187,12 +193,15 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ - | tee integration_test_output.txt + INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ + > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} - run: go-junit-report -in integration_test_output.txt -set-exit-code > junit_integration_report.xml || true + run: | + grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true + go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml || true - name: Integration Test Report uses: dorny/test-reporter@v1 if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} @@ -200,6 +209,7 @@ jobs: name: Integration Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/junit_integration_report.xml reporter: java-junit + fail-on-error: 'false' - name: Upload integration test coverage results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/codecov-action@v5 @@ -209,6 +219,23 @@ jobs: files: ${{ matrix.module }}/junit_integration_report.xml name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} + # Extra JUnit report (e.g., from Python integration tests running inside Docker) + - name: Extra Test Report + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: dorny/test-reporter@v1 + with: + name: Extra Test Report (${{ matrix.module }}) + path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + reporter: java-junit + - name: Upload extra test results to Codecov + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: false + report_type: test_results + files: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + name: junit-extra-report-${{ strategy.job-index }} + token: ${{ secrets.CODECOV_TOKEN }} # Coverage handling - name: build coverage.txt working-directory: ${{ matrix.module }} @@ -226,3 +253,23 @@ jobs: files: ${{ matrix.module }}/coverage.txt verbose: true fail_ci_if_error: true # optional (default = false) + - name: build e2e coverage + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + working-directory: ${{ matrix.module }} + run: | + if [ -d coverage/e2e ] && [ "$(ls -A coverage/e2e 2>/dev/null)" ]; then + echo "Converting e2e coverage to text format" + go tool covdata textfmt -i=./coverage/e2e -o coverage-e2e.txt + else + echo "No e2e coverage data found" + fi + - name: Upload e2e test coverage to Codecov + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + report_type: coverage + files: ${{ matrix.module }}/coverage-e2e.txt + flags: e2e + verbose: true + fail_ci_if_error: false diff --git a/.github/workflows/go_lib_push_main.yml b/.github/workflows/go_lib_push_main.yml index 89705b9..3ff7423 100644 --- a/.github/workflows/go_lib_push_main.yml +++ b/.github/workflows/go_lib_push_main.yml @@ -31,6 +31,11 @@ on: description: "The duration before tests are stopped" type: string default: "10m" + EXTRA_JUNIT_REPORT: + description: "Path to an additional JUnit XML report (e.g., from Python integration tests). Relative to the module directory." + type: string + required: false + default: "" secrets: GH_CI_PAT: description: 'Token password for GitHub auth' @@ -112,6 +117,7 @@ jobs: run: | mkdir -p ${{ matrix.module }}/coverage/unit mkdir -p ${{ matrix.module }}/coverage/int + mkdir -p ${{ matrix.module }}/coverage/e2e # Run unit tests for the module. - name: go test working-directory: ${{ matrix.module }} @@ -142,12 +148,15 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - go test -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ - | tee integration_test_output.txt + INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ + > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} - run: go-junit-report -in integration_test_output.txt -set-exit-code > junit_integration_report.xml || true + run: | + grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true + go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml || true - name: Integration Test Report uses: dorny/test-reporter@v1 if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} @@ -155,6 +164,7 @@ jobs: name: Integration Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/junit_integration_report.xml reporter: java-junit + fail-on-error: 'false' - name: Upload integration test coverage results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/codecov-action@v5 @@ -164,6 +174,23 @@ jobs: files: ${{ matrix.module }}/junit_integration_report.xml name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} + # Extra JUnit report (e.g., from Python integration tests running inside Docker) + - name: Extra Test Report + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: dorny/test-reporter@v1 + with: + name: Extra Test Report (${{ matrix.module }}) + path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + reporter: java-junit + - name: Upload extra test results to Codecov + if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: false + report_type: test_results + files: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} + name: junit-extra-report-${{ strategy.job-index }} + token: ${{ secrets.CODECOV_TOKEN }} # Coverage handling - name: build coverage.txt working-directory: ${{ matrix.module }} @@ -181,6 +208,26 @@ jobs: files: ${{ matrix.module }}/coverage.txt verbose: true fail_ci_if_error: true # optional (default = false) + - name: build e2e coverage + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + working-directory: ${{ matrix.module }} + run: | + if [ -d coverage/e2e ] && [ "$(ls -A coverage/e2e 2>/dev/null)" ]; then + echo "Converting e2e coverage to text format" + go tool covdata textfmt -i=./coverage/e2e -o coverage-e2e.txt + else + echo "No e2e coverage data found" + fi + - name: Upload e2e test coverage to Codecov + if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + report_type: coverage + files: ${{ matrix.module }}/coverage-e2e.txt + flags: e2e + verbose: true + fail_ci_if_error: false release: # # Create a GitHub Release based on conventional commits. From f1bf8f66d4dcca77392954bfac1fef0cf636f9b8 Mon Sep 17 00:00:00 2001 From: Cesar Date: Wed, 22 Apr 2026 15:56:30 +0200 Subject: [PATCH 11/16] chore: add extra step to check report exists --- .github/workflows/go_app_pull_requests.yml | 9 +++++++-- .github/workflows/go_app_push_main.yml | 9 +++++++-- .github/workflows/go_lib_pull_requests.yml | 9 +++++++-- .github/workflows/go_lib_push_main.yml | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 5fc977e..25472fb 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -220,15 +220,20 @@ jobs: name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - - name: Extra Test Report + - name: Check extra JUnit report exists + id: check_extra_report if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + run: test -f "${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }}" + continue-on-error: true + - name: Extra Test Report + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: codecov/codecov-action@v5 with: fail_ci_if_error: false diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index e512efe..97268d0 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -170,15 +170,20 @@ jobs: name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - - name: Extra Test Report + - name: Check extra JUnit report exists + id: check_extra_report if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + run: test -f "${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }}" + continue-on-error: true + - name: Extra Test Report + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: codecov/test-results-action@v1 with: fail_ci_if_error: false diff --git a/.github/workflows/go_lib_pull_requests.yml b/.github/workflows/go_lib_pull_requests.yml index 57a2e73..c893ce2 100644 --- a/.github/workflows/go_lib_pull_requests.yml +++ b/.github/workflows/go_lib_pull_requests.yml @@ -220,15 +220,20 @@ jobs: name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - - name: Extra Test Report + - name: Check extra JUnit report exists + id: check_extra_report if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + run: test -f "${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }}" + continue-on-error: true + - name: Extra Test Report + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: codecov/codecov-action@v5 with: fail_ci_if_error: false diff --git a/.github/workflows/go_lib_push_main.yml b/.github/workflows/go_lib_push_main.yml index 3ff7423..8813dfc 100644 --- a/.github/workflows/go_lib_push_main.yml +++ b/.github/workflows/go_lib_push_main.yml @@ -175,15 +175,20 @@ jobs: name: junit-integration-report-${{ strategy.job-index }} token: ${{ secrets.CODECOV_TOKEN }} # Extra JUnit report (e.g., from Python integration tests running inside Docker) - - name: Extra Test Report + - name: Check extra JUnit report exists + id: check_extra_report if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + run: test -f "${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }}" + continue-on-error: true + - name: Extra Test Report + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: dorny/test-reporter@v1 with: name: Extra Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/${{ inputs.EXTRA_JUNIT_REPORT }} reporter: java-junit - name: Upload extra test results to Codecov - if: ${{ (success() || failure()) && inputs.EXTRA_JUNIT_REPORT != '' && inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ steps.check_extra_report.outcome == 'success' }} uses: codecov/codecov-action@v5 with: fail_ci_if_error: false From 8c89133a82f2bc1f9ed367a3c478e056d95d0638 Mon Sep 17 00:00:00 2001 From: Cesar Date: Wed, 22 Apr 2026 16:27:33 +0200 Subject: [PATCH 12/16] fix: add atomic to the integration tests --- .github/workflows/go_app_pull_requests.yml | 2 +- .github/workflows/go_app_push_main.yml | 2 +- .github/workflows/go_lib_pull_requests.yml | 2 +- .github/workflows/go_lib_push_main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 25472fb..ca0ab61 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -193,7 +193,7 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + INTEGRATION_COVERAGE=true go test -cover -covermode=atomic -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index 97268d0..d91e4b8 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -143,7 +143,7 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + INTEGRATION_COVERAGE=true go test -cover -covermode=atomic -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report diff --git a/.github/workflows/go_lib_pull_requests.yml b/.github/workflows/go_lib_pull_requests.yml index c893ce2..fac1104 100644 --- a/.github/workflows/go_lib_pull_requests.yml +++ b/.github/workflows/go_lib_pull_requests.yml @@ -193,7 +193,7 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + INTEGRATION_COVERAGE=true go test -cover -covermode=atomic -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report diff --git a/.github/workflows/go_lib_push_main.yml b/.github/workflows/go_lib_push_main.yml index 8813dfc..4886a2f 100644 --- a/.github/workflows/go_lib_push_main.yml +++ b/.github/workflows/go_lib_push_main.yml @@ -148,7 +148,7 @@ jobs: if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - INTEGRATION_COVERAGE=true go test -cover -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ + INTEGRATION_COVERAGE=true go test -cover -covermode=atomic -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report From fc841d3e649f379b72b263760aa8bc810f4c32b5 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 24 Apr 2026 10:12:44 +0200 Subject: [PATCH 13/16] fix: propagate integration test failures to fail the build while preserving report generation --- .github/workflows/go_app_pull_requests.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index ca0ab61..51ad07f 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -192,26 +192,28 @@ jobs: - name: integration tests if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} + shell: bash run: | + set -o pipefail INTEGRATION_COVERAGE=true go test -cover -covermode=atomic -v ${{ inputs.GO_TEST_INTEGRATION_TAGS }} -timeout ${{ inputs.GO_TEST_INTEGRATION_TIMEOUT }} ./... \ -args -test.gocoverdir="${{ github.workspace }}/${{ matrix.module }}/coverage/int" \ > >(tee integration_test_output.txt) 2> >(tee integration_test_stderr.txt >&2) - name: Build Integration Test Junit report - if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true - go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml || true + go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml - name: Integration Test Report uses: dorny/test-reporter@v1 - if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.GO_TEST_INTEGRATION_ENABLED }} with: name: Integration Test Report (${{ matrix.module }}) path: ${{ matrix.module }}/junit_integration_report.xml reporter: java-junit fail-on-error: 'false' - name: Upload integration test results to Codecov - if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} + if: ${{ (success() || failure()) && inputs.GO_TEST_INTEGRATION_ENABLED }} uses: codecov/codecov-action@v5 with: fail_ci_if_error: true # optional (default = false) From cbaba94ce98a665a0565accf99c0a21523c22470 Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 24 Apr 2026 10:50:05 +0200 Subject: [PATCH 14/16] fix: propagate integration test failures and fix grep pattern to capture indented subtest results --- .github/workflows/go_app_pull_requests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 51ad07f..6851ead 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -202,7 +202,7 @@ jobs: if: ${{ (success() || failure()) && inputs.GO_TEST_INTEGRATION_ENABLED }} working-directory: ${{ matrix.module }} run: | - grep -E '^(=== |--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true + grep -E '^(\s*=== |\s*--- |\s*(PASS|FAIL|ok\s|coverage:|SKIP|\?)\s)' integration_test_output.txt > integration_test_go_only.txt || true go-junit-report -in integration_test_go_only.txt -set-exit-code > junit_integration_report.xml - name: Integration Test Report uses: dorny/test-reporter@v1 From cffee85444d7616d7b4d7131a0ddca811f5ed14a Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 12 May 2026 17:09:26 +0200 Subject: [PATCH 15/16] fix: add create-commit and send-notification steps for v5 compatibilty --- .github/workflows/go_app_pull_requests.yml | 12 ++++++++++++ .github/workflows/go_app_push_main.yml | 12 ++++++++++++ .github/workflows/go_lib_pull_requests.yml | 12 ++++++++++++ .github/workflows/go_lib_push_main.yml | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 6851ead..5d80ce8 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -280,6 +280,18 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false + - name: Create Codecov commit + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: create-commit + - name: Send Codecov notifications + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: send-notifications docker-build: # # ensures the docker image will build without pushing to the registry diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index d91e4b8..2f649f1 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -225,6 +225,18 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false + - name: Create Codecov commit + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: create-commit + - name: Send Codecov notifications + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: send-notifications release: # # Create a GitHub Release based on conventional commits. diff --git a/.github/workflows/go_lib_pull_requests.yml b/.github/workflows/go_lib_pull_requests.yml index fac1104..70179bf 100644 --- a/.github/workflows/go_lib_pull_requests.yml +++ b/.github/workflows/go_lib_pull_requests.yml @@ -278,3 +278,15 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false + - name: Create Codecov commit + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: create-commit + - name: Send Codecov notifications + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: send-notifications diff --git a/.github/workflows/go_lib_push_main.yml b/.github/workflows/go_lib_push_main.yml index 4886a2f..a087775 100644 --- a/.github/workflows/go_lib_push_main.yml +++ b/.github/workflows/go_lib_push_main.yml @@ -233,6 +233,18 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false + - name: Create Codecov commit + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: create-commit + - name: Send Codecov notifications + if: ${{ !cancelled() }} + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + run_command: send-notifications release: # # Create a GitHub Release based on conventional commits. From 0f77e58b7360cc1d51f5709459f2b284bf452618 Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 12 May 2026 18:03:28 +0200 Subject: [PATCH 16/16] chore: upgrade to v6 --- .github/workflows/go_app_pull_requests.yml | 22 +++++----------------- .github/workflows/go_app_push_main.yml | 20 ++++---------------- .github/workflows/go_lib_pull_requests.yml | 22 +++++----------------- .github/workflows/go_lib_push_main.yml | 22 +++++----------------- 4 files changed, 19 insertions(+), 67 deletions(-) diff --git a/.github/workflows/go_app_pull_requests.yml b/.github/workflows/go_app_pull_requests.yml index 5d80ce8..6cefb50 100644 --- a/.github/workflows/go_app_pull_requests.yml +++ b/.github/workflows/go_app_pull_requests.yml @@ -178,7 +178,7 @@ jobs: path: ${{ matrix.module }}/junit_report.xml reporter: java-junit - name: Upload unit test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -214,7 +214,7 @@ jobs: fail-on-error: 'false' - name: Upload integration test results to Codecov if: ${{ (success() || failure()) && inputs.GO_TEST_INTEGRATION_ENABLED }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -236,7 +236,7 @@ jobs: reporter: java-junit - name: Upload extra test results to Codecov if: ${{ steps.check_extra_report.outcome == 'success' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: false report_type: test_results @@ -253,7 +253,7 @@ jobs: go tool covdata textfmt -i=./coverage/unit -o coverage.txt fi - name: Upload test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -272,7 +272,7 @@ jobs: fi - name: Upload e2e test coverage to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -280,18 +280,6 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false - - name: Create Codecov commit - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: create-commit - - name: Send Codecov notifications - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: send-notifications docker-build: # # ensures the docker image will build without pushing to the registry diff --git a/.github/workflows/go_app_push_main.yml b/.github/workflows/go_app_push_main.yml index 2f649f1..ed45ced 100644 --- a/.github/workflows/go_app_push_main.yml +++ b/.github/workflows/go_app_push_main.yml @@ -131,7 +131,7 @@ jobs: path: ${{ matrix.module }}/junit_report.xml reporter: java-junit - name: Upload unit test results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -162,7 +162,7 @@ jobs: reporter: java-junit - name: Upload integration test results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -200,7 +200,7 @@ jobs: go tool covdata textfmt -i=./coverage/unit -o coverage.txt fi - name: Upload test coverage results to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} files: ${{ matrix.module }}/coverage.txt @@ -218,25 +218,13 @@ jobs: fi - name: Upload e2e test coverage to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} files: ${{ matrix.module }}/coverage-e2e.txt flags: e2e verbose: true fail_ci_if_error: false - - name: Create Codecov commit - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: create-commit - - name: Send Codecov notifications - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: send-notifications release: # # Create a GitHub Release based on conventional commits. diff --git a/.github/workflows/go_lib_pull_requests.yml b/.github/workflows/go_lib_pull_requests.yml index 70179bf..f3dedc1 100644 --- a/.github/workflows/go_lib_pull_requests.yml +++ b/.github/workflows/go_lib_pull_requests.yml @@ -181,7 +181,7 @@ jobs: path: ${{ matrix.module }}/junit_report.xml reporter: java-junit - name: Upload unit test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -212,7 +212,7 @@ jobs: fail-on-error: 'false' - name: Upload integration test coverage results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -234,7 +234,7 @@ jobs: reporter: java-junit - name: Upload extra test results to Codecov if: ${{ steps.check_extra_report.outcome == 'success' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: false report_type: test_results @@ -251,7 +251,7 @@ jobs: go tool covdata textfmt -i=./coverage/unit -o coverage.txt fi - name: Upload test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -270,7 +270,7 @@ jobs: fi - name: Upload e2e test coverage to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -278,15 +278,3 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false - - name: Create Codecov commit - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: create-commit - - name: Send Codecov notifications - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: send-notifications diff --git a/.github/workflows/go_lib_push_main.yml b/.github/workflows/go_lib_push_main.yml index a087775..d1e7251 100644 --- a/.github/workflows/go_lib_push_main.yml +++ b/.github/workflows/go_lib_push_main.yml @@ -136,7 +136,7 @@ jobs: path: ${{ matrix.module }}/junit_report.xml reporter: java-junit - name: Upload unit test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -167,7 +167,7 @@ jobs: fail-on-error: 'false' - name: Upload integration test coverage results to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: true # optional (default = false) report_type: test_results @@ -189,7 +189,7 @@ jobs: reporter: java-junit - name: Upload extra test results to Codecov if: ${{ steps.check_extra_report.outcome == 'success' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: false report_type: test_results @@ -206,7 +206,7 @@ jobs: go tool covdata textfmt -i=./coverage/unit -o coverage.txt fi - name: Upload test coverage results to Codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -225,7 +225,7 @@ jobs: fi - name: Upload e2e test coverage to Codecov if: ${{ inputs.GO_TEST_INTEGRATION_ENABLED && hashFiles(format('{0}/coverage-e2e.txt', matrix.module)) != '' }} - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} report_type: coverage @@ -233,18 +233,6 @@ jobs: flags: e2e verbose: true fail_ci_if_error: false - - name: Create Codecov commit - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: create-commit - - name: Send Codecov notifications - if: ${{ !cancelled() }} - uses: codecov/codecov-action@v5 - with: - token: ${{ secrets.CODECOV_TOKEN }} - run_command: send-notifications release: # # Create a GitHub Release based on conventional commits.