Skip to content

Commit 9d7a30a

Browse files
authored
#301: mutation testing (#491)
1 parent c8799e1 commit 9d7a30a

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/mutation-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Mutation Test
2+
3+
# Runs manually
4+
on:
5+
workflow_dispatch
6+
7+
jobs:
8+
9+
pitest-report:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: recursive
16+
- name: Set up JDK
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: '17'
20+
- name: Run pitest coverage
21+
run: |
22+
cd cli
23+
mvn test-compile org.pitest:pitest-maven:mutationCoverage -DtargetClasses=com.devonfw.tools.ide* -DtargetTests=com.devonfw.tools.ide*
24+
- name: Upload report
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: pit-report
28+
path: cli/target/pit-reports

pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<dependency>
2727
<groupId>org.junit.jupiter</groupId>
2828
<artifactId>junit-jupiter</artifactId>
29-
<version>5.9.0</version>
29+
<version>5.9.2</version>
3030
<scope>test</scope>
3131
</dependency>
3232
<dependency>
@@ -84,6 +84,18 @@
8484
</execution>
8585
</executions>
8686
</plugin>
87+
<plugin>
88+
<groupId>org.pitest</groupId>
89+
<artifactId>pitest-maven</artifactId>
90+
<version>1.16.1</version>
91+
<dependencies>
92+
<dependency>
93+
<groupId>org.pitest</groupId>
94+
<artifactId>pitest-junit5-plugin</artifactId>
95+
<version>1.2.1</version>
96+
</dependency>
97+
</dependencies>
98+
</plugin>
8799
</plugins>
88100
</build>
89101

0 commit comments

Comments
 (0)