Skip to content
Snippets Groups Projects
Commit f07c2e04 authored by Carl Jones's avatar Carl Jones
Browse files

Update CI and Gradle build to Java 17.

Add pitest for mutation testing.

Separate build into many phases.
parent ad8d0c20
No related branches found
Tags tag-to-test-CI-1
No related merge requests found
......@@ -8,8 +8,12 @@ default:
stages:
- compile
- analyse
- assemble
- build
- code-coverage
- mutate
- publish
before_script:
......@@ -24,12 +28,36 @@ cache:
- .gradle/wrapper
- .gradle/caches
compile:gradle:
stage: compile
only:
- tags
script:
- ./gradlew --continue compileJava
artifacts:
name: "$CI_JOB_NAME"
paths:
- ./build/classes/java/main
expire_in: 4 week
analyse:gradle:
stage: analyse
only:
- tags
script:
- ./gradlew --continue checkstyleMain
artifacts:
name: "$CI_JOB_NAME"
paths:
- ./build/reports/checkstyle/
expire_in: 4 week
assemble:gradle:
stage: assemble
only:
- tags
script:
- ./gradlew shadowJar
- ./gradlew --continue shadowJar
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -42,16 +70,36 @@ build:gradle:
only:
- tags
script:
- ./gradlew buildAndReport
- ./gradlew --continue build
artifacts:
name: "$CI_JOB_NAME"
paths:
- ./build/reports/tests/
- ./build/reports/checkstyle/
- ./build/jacocoHtml
- ./build/libs/*.jar
- ./build/jacoco/test.exec
expire_in: 4 week
code-coverage:gradle:
stage: code-coverage
only:
- tags
script:
- ./gradlew --continue jacocoTestReport
- ./gradlew --continue jacocoTestCoverageVerification
artifacts:
name: "$CI_JOB_NAME"
paths:
- ./build/jacocoHtml/
expire_in: 4 week
mutate:gradle:
stage: mutate
only:
- tags
script:
- ./gradlew --continue pitest
pages:
......@@ -73,4 +121,3 @@ pages:
paths:
- public
......@@ -4,9 +4,13 @@ plugins {
id 'checkstyle'
id 'idea'
id 'application'
id 'info.solidsoft.pitest' version '1.9.11'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}
apply plugin: 'info.solidsoft.pitest.aggregator' // to 'pitestReportAggregate' appear
group 'com.nsa.cm6123-6623'
version '1.0-SNAPSHOT'
......@@ -104,3 +108,19 @@ task buildAndReport {
rootProject.tasks.named("jar") {
duplicatesStrategy = 'include'
}
pitest {
targetClasses = ['uk.ac.cf.cm6123.cardgames.*'] //by default "${project.group}.*"
//pitestVersion = '1.9.0' //not needed when a default PIT version should be used
threads = 4
outputFormats = ['XML', 'HTML']
timestampedReports = false
junit5PluginVersion = '1.0.0'
reportAggregator {
testStrengthThreshold.set(50)
mutationThreshold.set(40)
maxSurviving.set(3)
}
}
rootProject.name = 'assessment-2023-starter-monopoly'
rootProject.name = 'assessment-2024-starter-monopoly'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment