-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.91 KB
/
14-backend-pitest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: "14-backend-pitest: Java Mutation Testing (Pitest)"
on:
workflow_dispatch:
push:
branches: [ main ]
paths: [src/**, pom.xml, lombok.config]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/[email protected]
- name: Set up Java (version from .java-version file)
uses: actions/setup-java@v3
with:
distribution: semeru # See: https://github.com/actions/setup-java#supported-distributions
java-version-file: ./.java-version
- name: Build with Maven
run: mvn -B test
# Note that we DO NOT download history in this job;
# this job is intended as a "reset" of the history each time the
# main branch changes
- name: Pitest
run: mvn test org.pitest:pitest-maven:mutationCoverage -DmutationThreshold=100
- name: Upload Pitest History to Artifacts
if: always() # always upload artifacts, even if tests fail
uses: actions/[email protected]
with:
name: pitest-main-history.bin
path: target/pit-history/history.bin
- name: Upload Pitest to Artifacts
if: always() # always upload artifacts, even if tests fail
uses: actions/[email protected]
with:
name: pitest
path: target/pit-reports/*
- name: Deploy 🚀
if: always() # always upload artifacts, even if tests fail
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: target/pit-reports # The folder where the files we want to publish are located
clean: true # Automatically remove deleted files from the deploy branch
target-folder: pitest # The folder that we serve our files from