|
1 | 1 | name: 'Quality Monitor PR' |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request: |
| 4 | + pull_request_target: |
5 | 5 |
|
6 | 6 | jobs: |
7 | 7 | build: |
|
10 | 10 | name: Build, test and monitor quality on Ubuntu |
11 | 11 |
|
12 | 12 | steps: |
13 | | - - uses: actions/checkout@v4 |
| 13 | + - name: 'Checkout merge commit' |
| 14 | + uses: actions/checkout@v4 |
| 15 | + with: |
| 16 | + ref: "${{ github.event.pull_request.merge_commit_sha }}" |
| 17 | + if: github.event.pull_request.merge_commit_sha != '' |
| 18 | + - name: 'Checkout PR head commit' |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + ref: "${{ github.event.pull_request.head.sha }}" |
| 22 | + if: github.event.pull_request.merge_commit_sha == '' |
14 | 23 | - name: Set up JDK 21 |
15 | 24 | uses: actions/setup-java@v4 |
16 | 25 | with: |
|
31 | 40 | env: |
32 | 41 | BROWSER: chrome-container |
33 | 42 | NVD_API_KEY: ${{ secrets.NVD_API_KEY }} |
34 | | - run: mvn -V --color always -ntp clean verify -Ppit -Pci -Powasp | tee maven.log |
| 43 | + run: mvn -V --color always -ntp clean verify -Pci -Powasp | tee maven.log |
35 | 44 | - name: Extract pull request number |
36 | 45 | uses: jwalton/gh-find-current-pr@v1 |
37 | 46 | id: pr |
@@ -125,23 +134,6 @@ jobs: |
125 | 134 | "pattern": "**/target/site/jacoco/jacoco.xml" |
126 | 135 | } |
127 | 136 | ] |
128 | | - }, |
129 | | - { |
130 | | - "name": "Mutation Coverage", |
131 | | - "tools": [ |
132 | | - { |
133 | | - "id": "pit", |
134 | | - "metric": "mutation", |
135 | | - "sourcePath": "src/main/java", |
136 | | - "pattern": "**/target/pit-reports/mutations.xml" |
137 | | - }, |
138 | | - { |
139 | | - "id": "pit", |
140 | | - "metric": "test-strength", |
141 | | - "sourcePath": "src/main/java", |
142 | | - "pattern": "**/target/pit-reports/mutations.xml" |
143 | | - } |
144 | | - ] |
145 | 137 | } |
146 | 138 | ], |
147 | 139 | "metrics": |
|
0 commit comments