22
33on :
44 push :
5- branches : [ main, master, develop ]
5+ branches : [main, master, develop]
66 pull_request :
7- branches : [ main, master, develop ]
7+ branches : [main, master, develop]
88 workflow_dispatch :
99
1010jobs :
@@ -14,165 +14,174 @@ jobs:
1414 strategy :
1515 matrix :
1616 java : [21, 22]
17-
17+
1818 steps :
19- - name : Checkout code
20- uses : actions/checkout@v5
21-
22- - name : Set up JDK ${{ matrix.java }}
23- uses : actions/setup-java@v5
24- with :
25- java-version : ${{ matrix.java }}
26- distribution : ' temurin'
27- cache : maven
28-
29- - name : Verify Maven configuration
30- run : mvn help:effective-settings
31-
32- - name : Run tests with coverage
33- run : mvn clean test jacoco:report
34-
35- - name : Generate test report
36- uses : dorny/test-reporter@v2
37- if : success() || failure()
38- with :
39- name : JDK ${{ matrix.java }} Tests
40- path : target/surefire-reports/*.xml
41- reporter : java-junit
42- fail-on-error : false
19+ - name : Checkout code
20+ uses : actions/checkout@v5
21+
22+ - name : Set up JDK ${{ matrix.java }}
23+ uses : actions/setup-java@v5
24+ with :
25+ java-version : ${{ matrix.java }}
26+ distribution : " temurin"
27+ cache : maven
28+
29+ - name : Verify Maven configuration
30+ run : mvn help:effective-settings
31+
32+ - name : Run tests with coverage
33+ run : mvn clean test jacoco:report
34+
35+ - name : Generate test report
36+ uses : dorny/test-reporter@v2
37+ if : success() || failure()
38+ with :
39+ name : JDK ${{ matrix.java }} Tests
40+ path : target/surefire-reports/*.xml
41+ reporter : java-junit
42+ fail-on-error : false
43+
44+ - name : Upload coverage reports to Codecov
45+ if : matrix.java == '21'
46+ uses : codecov/codecov-action@v5
47+ with :
48+ token : ${{ secrets.CODECOV_TOKEN }}
49+ file : ./target/site/jacoco/jacoco.xml
50+ fail_ci_if_error : false
51+ verbose : true
4352
4453 build :
4554 name : Build and Verify
4655 runs-on : ubuntu-latest
4756 needs : test
48-
57+
4958 steps :
50- - name : Checkout code
51- uses : actions/checkout@v5
52-
53- - name : Set up JDK 21
54- uses : actions/setup-java@v5
55- with :
56- java-version : 21
57- distribution : ' temurin'
58- cache : maven
59-
60- - name : Compile and package
61- run : mvn clean compile package
62-
63- - name : Verify JAR creation
64- run : |
65- ls -la target/
66- if [ ! -f target/inqwise-async-*.jar ]; then
67- echo "JAR file not found!"
68- exit 1
69- fi
70-
71- - name : Generate Javadoc
72- run : mvn javadoc:javadoc
73-
74- - name : Upload build artifacts
75- uses : actions/upload-artifact@v4
76- with :
77- name : maven-artifacts
78- path : |
79- target/*.jar
80- target/site/apidocs/
81- retention-days : 30
59+ - name : Checkout code
60+ uses : actions/checkout@v5
61+
62+ - name : Set up JDK 21
63+ uses : actions/setup-java@v5
64+ with :
65+ java-version : 21
66+ distribution : " temurin"
67+ cache : maven
68+
69+ - name : Compile and package
70+ run : mvn clean compile package
71+
72+ - name : Verify JAR creation
73+ run : |
74+ ls -la target/
75+ if [ ! -f target/inqwise-async-*.jar ]; then
76+ echo "JAR file not found!"
77+ exit 1
78+ fi
79+
80+ - name : Generate Javadoc
81+ run : mvn javadoc:javadoc
82+
83+ - name : Upload build artifacts
84+ uses : actions/upload-artifact@v4
85+ with :
86+ name : maven-artifacts
87+ path : |
88+ target/*.jar
89+ target/site/apidocs/
90+ retention-days : 30
8291
8392 code-quality :
8493 name : Code Quality
8594 runs-on : ubuntu-latest
86-
95+
8796 steps :
88- - name : Checkout code
89- uses : actions/checkout@v5
90-
91- - name : Set up JDK 21
92- uses : actions/setup-java@v5
93- with :
94- java-version : 21
95- distribution : ' temurin'
96- cache : maven
97-
98- - name : Run dependency check
99- run : mvn dependency:analyze
100-
101- - name : Check for security vulnerabilities
102- run : mvn dependency:tree
103-
104- - name : Validate Maven project
105- run : mvn validate
106-
107- - name : Security scan info
108- run : |
109- echo "🔒 Security scanning available via dedicated Snyk workflow"
110- echo " - On pull requests and releases"
111- echo " - Monthly scheduled scans"
112- echo " - Manual dispatch available"
113- echo "💡 This optimizes free tier usage while maintaining security coverage"
114- echo "⚙️ Configure SNYK_TOKEN in repository secrets to enable scanning"
97+ - name : Checkout code
98+ uses : actions/checkout@v5
99+
100+ - name : Set up JDK 21
101+ uses : actions/setup-java@v5
102+ with :
103+ java-version : 21
104+ distribution : " temurin"
105+ cache : maven
106+
107+ - name : Run dependency check
108+ run : mvn dependency:analyze
109+
110+ - name : Check for security vulnerabilities
111+ run : mvn dependency:tree
112+
113+ - name : Validate Maven project
114+ run : mvn validate
115+
116+ - name : Security scan info
117+ run : |
118+ echo "🔒 Security scanning available via dedicated Snyk workflow"
119+ echo " - On pull requests and releases"
120+ echo " - Monthly scheduled scans"
121+ echo " - Manual dispatch available"
122+ echo "💡 This optimizes free tier usage while maintaining security coverage"
123+ echo "⚙️ Configure SNYK_TOKEN in repository secrets to enable scanning"
115124
116125 integration-test :
117126 name : Integration Tests
118127 runs-on : ubuntu-latest
119128 needs : build
120-
129+
121130 steps :
122- - name : Checkout code
123- uses : actions/checkout@v5
124-
125- - name : Set up JDK 21
126- uses : actions/setup-java@v5
127- with :
128- java-version : 21
129- distribution : ' temurin'
130- cache : maven
131-
132- - name : Run integration tests with coverage
133- run : mvn clean verify jacoco:report
134-
135- - name : Test RFC compliance
136- run : mvn test -Dtest=RFC*
137-
138- - name : Test Stream compatibility
139- run : mvn test -Dtest=*Compatibility*
140-
141- - name : Upload coverage reports
142- uses : codecov/codecov-action@v5
143- with :
144- file : target/site/jacoco/jacoco.xml
145- flags : unittests
146- name : codecov-umbrella
147- fail_ci_if_error : false
131+ - name : Checkout code
132+ uses : actions/checkout@v5
133+
134+ - name : Set up JDK 21
135+ uses : actions/setup-java@v5
136+ with :
137+ java-version : 21
138+ distribution : " temurin"
139+ cache : maven
140+
141+ - name : Run integration tests with coverage
142+ run : mvn clean verify jacoco:report
143+
144+ - name : Test RFC compliance
145+ run : mvn test -Dtest=RFC*
146+
147+ - name : Test Stream compatibility
148+ run : mvn test -Dtest=*Compatibility*
149+
150+ - name : Upload coverage reports
151+ uses : codecov/codecov-action@v5
152+ with :
153+ file : target/site/jacoco/jacoco.xml
154+ flags : unittests
155+ name : codecov-umbrella
156+ fail_ci_if_error : false
148157
149158 release-check :
150159 name : Release Readiness
151160 runs-on : ubuntu-latest
152161 if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
153162 needs : [test, build, code-quality, integration-test]
154-
163+
155164 steps :
156- - name : Checkout code
157- uses : actions/checkout@v5
158-
159- - name : Set up JDK 21
160- uses : actions/setup-java@v5
161- with :
162- java-version : 21
163- distribution : ' temurin'
164- cache : maven
165-
166- - name : Check if ready for release
167- run : |
168- mvn clean package -DskipTests
169- mvn source:jar javadoc:jar
170- echo "✅ Release artifacts can be generated successfully"
171-
172- - name : Validate release profile
173- run : |
174- if mvn help:all-profiles | grep -q "sonatype-oss-release"; then
175- echo "✅ Release profile found"
176- else
177- echo "⚠️ Release profile not found - manual release process required"
178- fi
165+ - name : Checkout code
166+ uses : actions/checkout@v5
167+
168+ - name : Set up JDK 21
169+ uses : actions/setup-java@v5
170+ with :
171+ java-version : 21
172+ distribution : " temurin"
173+ cache : maven
174+
175+ - name : Check if ready for release
176+ run : |
177+ mvn clean package -DskipTests
178+ mvn source:jar javadoc:jar
179+ echo "✅ Release artifacts can be generated successfully"
180+
181+ - name : Validate release profile
182+ run : |
183+ if mvn help:all-profiles | grep -q "sonatype-oss-release"; then
184+ echo "✅ Release profile found"
185+ else
186+ echo "⚠️ Release profile not found - manual release process required"
187+ fi
0 commit comments