Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/mutationtesting.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Mutation Testing
on:
pull_request:

jobs:
pitest:
# Only run on PRs from the repo. PRs from forks will fail due to lack of permissions and
# must use a two stage process
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
# important to set a fetch depth of 2. By default the checkout action make no history available
fetch-depth: 2
- name: Setup Java JDK
uses: actions/setup-java@v4.2.2
with:
distribution: 'temurin'
java-version: 21
- name: run pitest
working-directory: ./service
run: |
echo "api.version=1.44" > $HOME/.docker-java.properties &&
./gradlew pitest-github
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#name: Mutation Testing
#on:
# pull_request:
#
#jobs:
# pitest:
# # Only run on PRs from the repo. PRs from forks will fail due to lack of permissions and
# # must use a two stage process
# if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
# runs-on: ubuntu-latest
# steps:
# - name: Checkout project
# uses: actions/checkout@v4
# with:
# # important to set a fetch depth of 2. By default the checkout action make no history available
# fetch-depth: 2
# - name: Setup Java JDK
# uses: actions/setup-java@v4.2.2
# with:
# distribution: 'temurin'
# java-version: 21
# - name: run pitest
# working-directory: ./service
# run: |
# echo "api.version=1.44" > $HOME/.docker-java.properties &&
# ./gradlew pitest-github
# env:
# REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 23 additions & 23 deletions service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ plugins {
id 'org.sonarqube' version '6.3.1.5724'

// Mutation testing
id 'info.solidsoft.pitest' version '1.15.0'
id 'com.arcmutate.github' version '2.2.4'
// id 'info.solidsoft.pitest' version '1.15.0'
// id 'com.arcmutate.github' version '2.2.4'
}

spotbugs {
Expand Down Expand Up @@ -96,8 +96,8 @@ dependencies {
spotbugs 'com.github.spotbugs:spotbugs:4.9.8'
spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.8'

pitest 'com.arcmutate:base:1.3.2'
pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
// pitest 'com.arcmutate:base:1.3.2'
// pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
}

dependencyManagement {
Expand Down Expand Up @@ -179,25 +179,25 @@ spotbugsMain {
excludeFilter.set(file("spotbugs/exclude.xml"))
}

pitest {
pitestVersion = '1.16.3'
junit5PluginVersion = '1.2.1'
outputFormats = ['gitci']

// git feature limits analysis to contents of PR only
features = ["+GIT(from[HEAD~1])"]

// PRs which don't introduce any production code changes, shouldn't fail the Mutation Testing Actions Workflow
failWhenNoMutations = false

mutators = ['STRONGER', 'EXTENDED_ALL']

threads = project.getGradle().getStartParameter().getMaxWorkerCount()
}

pitestGithub {
deleteOldSummaries = true
}
//pitest {
// pitestVersion = '1.16.3'
// junit5PluginVersion = '1.2.1'
// outputFormats = ['gitci']
//
// // git feature limits analysis to contents of PR only
// features = ["+GIT(from[HEAD~1])"]
//
// // PRs which don't introduce any production code changes, shouldn't fail the Mutation Testing Actions Workflow
// failWhenNoMutations = false
//
// mutators = ['STRONGER', 'EXTENDED_ALL']
//
// threads = project.getGradle().getStartParameter().getMaxWorkerCount()
//}
//
//pitestGithub {
// deleteOldSummaries = true
//}

sonar {
properties {
Expand Down
Loading