Skip to content

Conversation

@tonygermano
Copy link
Member

@tonygermano tonygermano commented Feb 10, 2026

See below for details of each commit.

Jacoco is now disabled by default in the main build. There is a message echoed during the build that informs the developer they can pass the -Dcoverage=true property to enable collection of execution data. This was meant to speed up the local development cycle. When enabled, html reports are now produced for each sub-project under build/reports/jacoco/test/html.

This PR does not actually do anything to publish the jacoco report in github, though it updates the github action to prepare the html and xml files if we want to make use of them in a future PR. Our test coverage is so poor right now, that I don't really see an immediate value to publishing it on every pull request, and this one was getting big enough as it is.

supersedes #150
fixes #144


commit ef7ae42

build: fail build if tests fail

This will allow all tests for a given sub-project to finish, but will
abort the rest of the build.

Previously the build would finish successfully even if there were test
failures.

commit 63c2dff

build: Standardize test output and decouple JaCoCo coverage

Refactors the Ant build scripts across client, command, donkey, and
server projects to improve CI integration and local developer
experience.

Changes:
* Decoupled Coverage: Separated unit test execution (`test-run`) from
  code coverage instrumentation (`test-coverage`). Developers can now
  run tests locally without the performance penalty of the JaCoCo agent
  unless explicitly requested.
* Standardized Output: Consolidated all test artifacts into a unified,
  Gradle-compliant directory structure:
  - Raw results: `build/test-results/test`
  - HTML/XML Reports: `build/reports/tests` and `build/reports/jacoco`

Single project Usage:
- Run standard unit tests: `ant test-run`
- Run tests with coverage: `ant test-coverage`

Full Build Usage:
- Run standard unit tests: `ant -f mirth-build.xml build`
- Run tests with coverage: `ant -f mirth-build.xml build -Dcoverage=true`

commit f506683

build: Add comprehensive clean targets and legacy cleanup

Improves build hygiene by ensuring all generated artifacts are removed
during clean operations.

Changes:
* Global Clean: Added a top-level `clean-all` target in
  `mirth-build.xml` that cascades to all sub-projects.
* Legacy Cleanup: Introduced `clean-legacy-dirs` target to remove
  obsolete directories (`junit-reports`, `code-coverage-reports`)
  ensuring developers do not view stale reports.
* Deep Clean: Updated sub-project clean targets to include
  `${test_classes}` and `${build.dir}`, preventing stale class files
  from polluting subsequent builds.

commit e854921

ci: Implement secure test result reporting via GitHub Actions

Establishes a split-workflow CI pipeline to safely run tests and report
results, complying with security best practices for public repositories.

Changes:
* Build Workflow:
  - Updated the Ant build command to enable coverage
    (`-Dcoverage=true`).
  - Added a "Stage Test Results" step to aggregate XML reports from
    all sub-projects (client, server, donkey, etc.) while preserving
    directory structure.
  - Added an "Event File" job to capture PR metadata for secure
    downstream processing.
* Reporting Workflow:
  - Created `upload_test_results.yaml` triggered by `workflow_run`.
  - Implemented the privileged report publishing step separately from
    the unprivileged build step.
  - configured `EnricoMi/publish-unit-test-result-action` to ingest the
    aggregated XML reports.

Security:
* Uses the `workflow_run` pattern to allow safe PR commenting from forks
  without exposing write tokens to the build environment.

This will allow all tests for a given sub-project to finish, but will
abort the rest of the build.

Previously the build would finish successfully even if there were test
failures.

Issue: OpenIntegrationEngine#144
Signed-off-by: Tony Germano <tony@germano.name>
Refactors the Ant build scripts across client, command, donkey, and
server projects to improve CI integration and local developer
experience.

Changes:
* Decoupled Coverage: Separated unit test execution (`test-run`) from
  code coverage instrumentation (`test-coverage`). Developers can now
  run tests locally without the performance penalty of the JaCoCo agent
  unless explicitly requested.
* Standardized Output: Consolidated all test artifacts into a unified,
  Gradle-compliant directory structure:
  - Raw results: `build/test-results/test`
  - HTML/XML Reports: `build/reports/tests` and `build/reports/jacoco`

Single project Usage:
- Run standard unit tests: `ant test-run`
- Run tests with coverage: `ant test-coverage`

Full Build Usage:
- Run standard unit tests: `ant -f mirth-build.xml build`
- Run tests with coverage: `ant -f mirth-build.xml build -Dcoverage=true`

Signed-off-by: Tony Germano <tony@germano.name>
Improves build hygiene by ensuring all generated artifacts are removed
during clean operations.

Changes:
* Global Clean: Added a top-level `clean-all` target in
  `mirth-build.xml` that cascades to all sub-projects.
* Legacy Cleanup: Introduced `clean-legacy-dirs` target to remove
  obsolete directories (`junit-reports`, `code-coverage-reports`)
  ensuring developers do not view stale reports.
* Deep Clean: Updated sub-project clean targets to include
  `${test_classes}` and `${build.dir}`, preventing stale class files
  from polluting subsequent builds.

Signed-off-by: Tony Germano <tony@germano.name>
Establishes a split-workflow CI pipeline to safely run tests and report
results, complying with security best practices for public repositories.

Changes:
* Build Workflow:
  - Updated the Ant build command to enable coverage
    (`-Dcoverage=true`).
  - Added a "Stage Test Results" step to aggregate XML reports from
    all sub-projects (client, server, donkey, etc.) while preserving
    directory structure.
  - Added an "Event File" job to capture PR metadata for secure
    downstream processing.
* Reporting Workflow:
  - Created `upload_test_results.yaml` triggered by `workflow_run`.
  - Implemented the privileged report publishing step separately from
    the unprivileged build step.
  - configured `EnricoMi/publish-unit-test-result-action` to ingest the
    aggregated XML reports.

Security:
* Uses the `workflow_run` pattern to allow safe PR commenting from forks
  without exposing write tokens to the build environment.

Signed-off-by: Tony Germano <tony@germano.name>
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.

[BUG] GH Pipelines does not indicate on failed test run

1 participant