-
Notifications
You must be signed in to change notification settings - Fork 0
195 lines (160 loc) · 5.02 KB
/
Copy pathci.yml
File metadata and controls
195 lines (160 loc) · 5.02 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: CI
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
workflow_dispatch:
jobs:
test:
name: Test on JDK ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [21, 22]
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: "temurin"
cache: maven
- name: Verify Maven configuration
run: mvn help:effective-settings
- name: Run tests with coverage
run: mvn clean test jacoco:report
- name: Verify coverage report exists
if: matrix.java == '21'
run: |
if [ ! -f target/site/jacoco/jacoco.xml ]; then
echo "Coverage report target/site/jacoco/jacoco.xml missing"
ls -R target || true
exit 1
fi
- name: Generate test report
uses: dorny/test-reporter@v3
if: success() || failure()
with:
name: JDK ${{ matrix.java }} Tests
path: target/surefire-reports/*.xml
reporter: java-junit
fail-on-error: false
- name: Upload coverage reports to Codecov
if: matrix.java == '21'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./target/site/jacoco/jacoco.xml
fail_ci_if_error: false
build:
name: Build and Verify
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: "temurin"
cache: maven
- name: Compile and package
run: mvn clean compile package
- name: Verify JAR creation
run: |
ls -la target/
if [ ! -f target/inqwise-async-*.jar ]; then
echo "JAR file not found!"
exit 1
fi
- name: Generate Javadoc
run: mvn javadoc:javadoc
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: maven-artifacts
path: |
target/*.jar
target/site/apidocs/
retention-days: 30
code-quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: "temurin"
cache: maven
- name: Run dependency check
run: mvn dependency:analyze
- name: Check for security vulnerabilities
run: mvn dependency:tree
- name: Validate Maven project
run: mvn validate
- name: Security scan info
run: |
echo "🔒 Security scanning available via dedicated Snyk workflow"
echo " - On pull requests and releases"
echo " - Monthly scheduled scans"
echo " - Manual dispatch available"
echo "💡 This optimizes free tier usage while maintaining security coverage"
echo "⚙️ Configure SNYK_TOKEN in repository secrets to enable scanning"
integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: "temurin"
cache: maven
- name: Run integration tests with coverage
run: mvn clean verify jacoco:report
- name: Test RFC compliance
run: mvn test -Dtest=RFC*
- name: Test Stream compatibility
run: mvn test -Dtest=*Compatibility*
- name: Upload coverage reports
uses: codecov/codecov-action@v7
with:
file: target/site/jacoco/jacoco.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
release-check:
name: Release Readiness
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs: [test, build, code-quality, integration-test]
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: "temurin"
cache: maven
- name: Check if ready for release
run: |
mvn clean package -DskipTests
mvn source:jar javadoc:jar
echo "✅ Release artifacts can be generated successfully"
- name: Validate release profile
run: |
if mvn help:all-profiles | grep -q "sonatype-oss-release"; then
echo "✅ Release profile found"
else
echo "⚠️ Release profile not found - manual release process required"
fi