forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (88 loc) · 2.45 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Pitest
on:
push:
branches:
- master
pull_request:
branches: '*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
if: github.repository == 'checkstyle/checkstyle'
strategy:
matrix:
profile:
- annotation
- ant
- api
- blocks
- coding-1
- coding-2
- coding-require-this-check
- common
- common-2
- design
- filters
- header
- imports
- indentation
- javadoc
- main
- metrics
- misc
- modifier
- naming
- packagenamesloader
- regexp
- sizes
- tree-walker
- utils
- whitespace
- xpath
- java-ast-visitor
# GUI package needs better test coverage before adding to execution.
# - gui
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Install groovy
run: |
sudo apt update
sudo apt install groovy
- name: Setup local maven cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: checkstyle-maven-cache-${{ hashFiles('**/pom.xml') }}
- name: Checkout
uses: actions/checkout@v3
- name: Generate pitest-${{ matrix.profile }} report
run: |
./.ci/pitest.sh "pitest-${{ matrix.profile }}"
- name: Patch command for pitest-${{ matrix.profile }}
if: failure()
run: |
printf "\nTo patch suppression list run:\n\n"
GIT_DIFF=$(git diff)
printf "patch -p1 << EOF\n%s\nEOF" "$GIT_DIFF"
exit 1
- name: Stage results
if: failure() || github.ref == 'refs/heads/master'
run: |
mkdir staging && cp -r target/pit-reports/ staging
git diff && git diff > target/pitest-${{ matrix.profile }}.patch
- name: Archive code coverage results
if: failure() || github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: pitest-${{ matrix.profile }}-coverage-report
path: |
staging
target/pitest-${{ matrix.profile }}.patch
retention-days: 7