-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.34 KB
/
main-build.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build Eclipse Ignore Helper
on:
push:
branches:
- 'main'
pull_request:
jobs:
build:
name: build and check
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK (8 and 17)
uses: actions/setup-java@v4
with:
java-version: |
8
17
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B verify -ntp --file pom.xml
- name: Run PITest Maven
run: mvn -B -Ppit-test verify -ntp --file pom.xml
- name: Run Integration Tests
run: mvn -B -Prun-its verify -ntp --file pom.xml
- name: Publish Test Report
uses: scacap/action-surefire-report@v1
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Analyze with SonarCloud.io
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
run: mvn -ntp -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }}