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
17 changes: 15 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,45 @@ name: Build

on:
push:
branches: [ "master" ]
branches:
- master
pull_request:
branches: [ "master" ]
types: [opened, synchronize, reopened]
schedule:
- cron: "0 3 * * 0-6"
workflow_dispatch:

permissions:
checks: write

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Compile and Unit tests (headless for GUI)
uses: GabrielBB/xvfb-action@v1.6
with:
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install

- name: Quality gate
run: mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Run mutation testing
run: mvn clean test-compile org.pitest:pitest-maven:mutationCoverage

- name: Compute and check tests strength
uses: teemoo7/mutation-testing-report-action@v0.1
29 changes: 29 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<maven.plugin.checkstyle.version>3.2.0</maven.plugin.checkstyle.version>
<maven.plugin.failsafe.version>3.0.0-M7</maven.plugin.failsafe.version>
<maven.plugin.jacoco.version>0.8.8</maven.plugin.jacoco.version>
<maven.plugin.pitest.version>1.9.0</maven.plugin.pitest.version>
<maven.plugin.project-info-reports.version>3.4.1</maven.plugin.project-info-reports.version>
<maven.plugin.site.version>4.0.0-M3</maven.plugin.site.version>
<maven.plugin.spotbugs.version>4.7.2.0</maven.plugin.spotbugs.version>
Expand Down Expand Up @@ -253,6 +254,34 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>${maven.plugin.pitest.version}</version>
<configuration>
<targetClasses>
<targetClass>ch.teemoo.bobby.*</targetClass>
</targetClasses>
<targetTests>
<targetTest>ch.teemoo.bobby.*</targetTest>
</targetTests>
<excludedClasses>
<param>*.gui.*</param>
</excludedClasses>
<excludedTestClasses>
<param>*.gui.*</param>
<param>*IT</param>
<param>*SwingTest</param>
<param>*FactoryTest</param>
</excludedTestClasses>
<outputFormats>
<outputFormat>XML</outputFormat>
</outputFormats>
<timestampedReports>false</timestampedReports>
<threads>2</threads>
</configuration>
</plugin>
</plugins>
</build>

Expand Down