File tree Expand file tree Collapse file tree 5 files changed +107
-30
lines changed
example/.github/workflows Expand file tree Collapse file tree 5 files changed +107
-30
lines changed Original file line number Diff line number Diff line change 1+ name : Maven build
2+
3+ on :
4+ push :
5+ paths :
6+ - ' example/**'
7+ - ' .github/workflows/*example*'
8+ pull_request :
9+ paths :
10+ - ' example/**'
11+ - ' .github/workflows/*example*'
12+
13+ defaults :
14+ run :
15+ working-directory : ./example
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+
21+ steps :
22+ - uses : actions/checkout@v3
23+
24+ - uses : actions/setup-java@v3
25+ with :
26+ distribution : zulu
27+ java-version : 11
28+
29+ - name : Cache Maven packages
30+ uses : actions/cache@v3
31+ with :
32+ path : ~/.m2
33+ key : ${{ runner.os }}-m2-v8-${{ hashFiles('**/pom.xml') }}
34+ restore-keys : ${{ runner.os }}-m2-v8
35+
36+ - name : Build
37+ run : mvn --batch-mode compile
38+
39+ - name : Test and package
40+ run : mvn --batch-mode package
41+
Original file line number Diff line number Diff line change 11name : Maven build
22
3- on : [ push, pull_request ]
3+ on :
4+ push :
5+ paths-ignore :
6+ - ' example/**'
7+ - ' .github/workflows/*example*'
8+ pull_request :
9+ paths-ignore :
10+ - ' example/**'
11+ - ' .github/workflows/*example*'
412
513jobs :
614 build :
Original file line number Diff line number Diff line change 1+ name : SonarCloud code analysis
2+
3+ on :
4+ push :
5+ paths :
6+ - ' example/**'
7+ - ' .github/workflows/*example*'
8+ pull_request :
9+ paths :
10+ - ' example/**'
11+ - ' .github/workflows/*example*'
12+
13+ defaults :
14+ run :
15+ working-directory : ./example
16+
17+ jobs :
18+ analyze :
19+ name : Analyze
20+ if : github.repository == 'web-eid/web-eid-authtoken-validation-java'
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
27+ - name : Set up JDK 17
28+ uses : actions/setup-java@v3
29+ with :
30+ distribution : zulu
31+ java-version : 17
32+ - name : Cache SonarCloud packages
33+ uses : actions/cache@v3
34+ with :
35+ path : ~/.sonar/cache
36+ key : ${{ runner.os }}-sonar
37+ restore-keys : ${{ runner.os }}-sonar
38+ - name : Cache Maven packages
39+ uses : actions/cache@v3
40+ with :
41+ path : ~/.m2
42+ key : ${{ runner.os }}-m2-v11-${{ hashFiles('**/pom.xml') }}
43+ restore-keys : ${{ runner.os }}-m2-v17
44+ - name : Build and analyze
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
47+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
48+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Original file line number Diff line number Diff line change 11name : SonarCloud code analysis
22
3- on : [push, pull_request]
3+ on :
4+ push :
5+ paths-ignore :
6+ - ' example/**'
7+ - ' .github/workflows/*example*'
8+ pull_request :
9+ paths-ignore :
10+ - ' example/**'
11+ - ' .github/workflows/*example*'
412
513jobs :
614 analyze :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments