Skip to content

Evaluate a GitHub Actions strategy for PIT mutation testing #293

Description

@renanfranca

Context

While implementing the opt-in PIT mutation testing profile from #255, the initial mutation test execution took approximately 22 minutes:

Mutation analysis: 21 minutes and 28 seconds
Total execution time: 21 minutes and 46 seconds

The execution analyzed:

  • 277 tests;
  • 1,025 mutations;
  • 3,913 test executions.

I initially considered adding mutation testing to the GitHub Actions pipeline. However, a runtime of approximately 22 minutes would significantly increase the feedback time and resource usage of the regular CI pipeline.

For now, PIT should remain an explicitly executed, opt-in validation rather than being added to the default pull request workflow.

Goal

Evaluate whether and how PIT mutation testing should be integrated into GitHub Actions without making the regular development feedback loop unnecessarily slow or expensive.

Options to investigate

  • A manually triggered workflow using workflow_dispatch.
  • A scheduled workflow that runs periodically.
  • Running mutation tests only before releases.
  • Limiting mutation testing to selected packages or bounded contexts.
  • Using multiple PIT threads and evaluating their impact on execution time, stability, and GitHub-hosted runner resources.
  • Publishing the generated PIT HTML report as a workflow artifact.
  • Introducing mutation score thresholds only after establishing a reliable CI baseline.
  • Keeping mutation testing exclusively local if the CI cost does not justify the benefit.

Acceptance criteria

  • Benchmark PIT execution on a GitHub-hosted runner.
  • Evaluate the impact of using multiple mutation testing threads.
  • Compare the available workflow trigger and scoping strategies.
  • Document the expected execution time and GitHub Actions resource cost.
  • Decide whether mutation testing should run manually, periodically, before releases, on selected code, or remain local-only.
  • Do not add PIT to the default pull request pipeline until this evaluation is complete.

Related work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions