Skip to content

Feat/extra junit reports#71

Open
cri0ll0 wants to merge 15 commits intomainfrom
feat/extra-junit-reports
Open

Feat/extra junit reports#71
cri0ll0 wants to merge 15 commits intomainfrom
feat/extra-junit-reports

Conversation

@cri0ll0
Copy link
Copy Markdown
Contributor

@cri0ll0 cri0ll0 commented Apr 17, 2026

Changes applied to all 4 Go workflows (app + lib, pull_requests + push_main):

  1. EXTRA_JUNIT_REPORT input parameter
    Allows caller workflows to specify a path to an additional JUnit XML report file (e.g., from Python integration tests running inside Docker containers). Optional, defaults to empty string — no impact on existing
    workflows that don't use it.

  2. coverage/e2e directory
    Added to the coverage output directories step. Separates coverage from application binaries running inside Docker (hit by external tests like Python) from Go integration test coverage (coverage/int) and unit test
    coverage (coverage/unit). Codecov merges all uploads automatically.

  3. Stdout/stderr separation for integration tests
    Changed 2>&1 | tee to > >(tee ...) 2> >(tee ... >&2). Go's log.Println (used by testcontainers-go) writes to stderr, but 2>&1 mixed it into stdout. This caused go-junit-report to parse Python test output lines
    (like ok (0.003s)) as Go test cases, producing ghost entries in the Integration Test Report. Separating streams keeps only Go test output in integration_test_output.txt.

  4. Grep filter before go-junit-report
    Filters integration_test_output.txt to only keep lines matching Go test framework patterns (=== RUN, --- PASS, PASS, FAIL, ok, coverage:, etc.) before passing to go-junit-report. This is a second line of defense
    against non-Go output leaking into the JUnit report, since go test -v re-emits all test binary output through its own stdout regardless of stderr separation.

  5. fail-on-error: 'false' on Integration Test Report
    The dorny/test-reporter action defaults to failing the job when it detects test failures in the JUnit XML. With mixed Go/Python output, go-junit-report could produce false failures that would block the entire CI
    pipeline. Setting this to false is safe because the go test step itself already fails the job via exit code if tests actually fail. The reporter is purely for display purposes.

  6. Extra Test Report steps
    Two new steps that run when EXTRA_JUNIT_REPORT is set: dorny/test-reporter (displays results as a GitHub check with individual test names) and codecov-action@v5 (uploads results to Codecov test analytics). Both
    use success() || failure() condition so they run even if the Integration Test Report step fails.

  7. E2e coverage build + upload steps
    Converts coverage data from coverage/e2e/ (collected from Docker containers built with -cover) to text format and uploads to Codecov with the e2e flag. This keeps e2e coverage separate from the combined
    unit+integration coverage upload, giving visibility into how much code is exercised by external tests vs. Go tests.

  8. Coverage flags and integration test coverage collection (push_main)
    Added INTEGRATION_COVERAGE=true, -cover, and -test.gocoverdir flags to integration test runs that were missing them. This ensures integration test coverage is collected on push-to-main, not just on pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant