Skip to content

Bonajo/pitest-report-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Pitest Report

A GitHub Action to publish the results from Pitest.

This action parses the mutations.{xml,csv} and publishes the results as annotations.

Usage

Add the Action to the workflow, basic example can be found below.

- name: Publish Pitest Report
  uses: Bonajo/[email protected]
  with:
    file: target/pit-reports/mutations.xml

Inputs

The Action has support for the following inputs:

name:
  description: Name of the check run
  required: false
  default: Pitest report
file:
  description: Pitest report file (either XML or CSV)
  required: false
  default: '**/pit-reports/mutations.xml'
summary:
  description: Publish a summary as part of the workflow
  required: false
  default: true
annotation-types:
  description: Which type of mutations to generate annotations for (ALL, SURVIVED, KILLED)
  required: false
  default: SURVIVED
output:
  description: Output location of the annotations (checks, summary)
  required: false
  default: checks
max-annotations:
  description: Limit the number of annotations that are generated (max 50)
  required: false
  default: 10
token:
  description: GitHub Access Token (see permissions)
  required: false
  default: ${{ github.token }}

Outputs

The Actions has the following outputs on successful run:

killed:
  description: Total number of killed mutations
survived:
  description: Total number of survived mutations

Permissions

To create the checks run the Action needs write permission for checks. This can be achieved by adding a permissions section to the workflow.

permissions:
  checks: write