File tree Expand file tree Collapse file tree 2 files changed +57
-16
lines changed Expand file tree Collapse file tree 2 files changed +57
-16
lines changed Original file line number Diff line number Diff line change 11name : Java CI
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - sdk-automation/models
8+ - promote/main
9+ pull_request :
10+ branches :
11+ - main
12+ - sdk-automation/models
13+ - promote/main
14+ workflow_dispatch : {}
15+
16+ permissions :
17+ contents : read
418
519jobs :
6- build :
20+ java-check :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v4
25+ - name : Set up JDK
26+ uses : actions/setup-java@v4
27+ with :
28+ java-version : ' 20'
29+ distribution : ' adopt'
30+ - name : Cache Maven packages
31+ uses : actions/cache@v3
32+ with :
33+ path : ~/.m2
34+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
35+ restore-keys : |
36+ ${{ runner.os }}-m2-
37+ - name : Check code style
38+ run : mvn -B checkstyle:check --no-transfer-progress
39+
40+ java-test :
741 runs-on : ubuntu-latest
42+ needs : java-check
43+
844 strategy :
945 matrix :
1046 java : [ '11', '17', '20' ]
47+
1148 steps :
1249 - uses : actions/checkout@v4
13- - name : Set up JDK ${{ matrix.Java }}
50+ - name : Set up JDK ${{ matrix.java }}
1451 uses : actions/setup-java@v4
15-
1652 with :
1753 java-version : ${{ matrix.java }}
1854 distribution : ' adopt'
19-
20- - name : Run the tests with Maven
21- run : mvn -B clean test package --no-transfer-progress
55+ - name : Cache Maven packages
56+ uses : actions/cache@v3
57+ with :
58+ path : ~/.m2
59+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
60+ restore-keys : |
61+ ${{ runner.os }}-m2-
62+ - name : Run tests with coverage
63+ run : mvn -B clean test package --no-transfer-progress
Original file line number Diff line number Diff line change 11name : Sonarcloud CI
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
8- types : [ opened, synchronize, reopened ]
4+ schedule :
5+ - cron : ' 0 0 * * 4'
6+ workflow_dispatch : {}
7+
8+ permissions :
9+ contents : read
10+ pull-requests : read
911
1012jobs :
11- SonarCloud-Build :
12- name : SonarCloud Build
13+ java-sonarqube :
1314 runs-on : ubuntu-latest
1415 steps :
1516 - uses : actions/checkout@v4
4041 run : mvn test jacoco:report
4142
4243 - name : Run SonarCloud Analysis
43- if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
4444 env :
45- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4645 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
4746 run : mvn sonar:sonar -Dsonar.projectKey=Adyen_adyen-java-api-library
You can’t perform that action at this time.
0 commit comments