-
Notifications
You must be signed in to change notification settings - Fork 0
236 lines (199 loc) · 6.65 KB
/
Copy pathci.yml
File metadata and controls
236 lines (199 loc) · 6.65 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
name: CI
on:
push:
branches:
- "**"
- "!integrated/**"
- "!stl-preview-head/**"
- "!stl-preview-base/**"
- "!generated"
- "!codegen/**"
- "codegen/stl/**"
pull_request:
branches-ignore:
- "stl-preview-head/**"
- "stl-preview-base/**"
permissions:
contents: read
concurrency:
group: java-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint & Licensing
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Check Java & Kotlin
run: ./scripts/lint
- name: Check shell scripts
run: >-
shellcheck
bin/check-release-environment
bin/check-release-workflow
bin/verify-release-signature
scripts/audit
scripts/build
scripts/check-reproducible
scripts/coverage
scripts/fast-format
scripts/format
scripts/java-format
scripts/kotlin-format
scripts/lint
scripts/test
scripts/upload-artifacts
- name: Check workflows
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
- name: Check repository licensing
uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0
build:
name: Build
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java 25 for shrinkers
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: oracle
java-version: "25"
- name: Save shrinker Java home
run: echo "SHRINKER_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
- name: Set up Java 26
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Build SDK
run: ./scripts/build
test:
name: Tests
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java 25 for shrinkers
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: oracle
java-version: "25"
- name: Save shrinker Java home
run: echo "SHRINKER_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
- name: Set up Java 26
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Run all tests without skips
run: ./scripts/test
coverage:
name: Coverage
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Enforce maintained-source coverage
run: ./scripts/coverage
- name: Upload coverage evidence
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: java-coverage
path: |
build/reports/jacoco/coverage/coverage.xml
build/reports/jacoco/coverage-raw/coverage.xml
retention-days: 14
dynamic-analysis:
name: Dynamic Analysis
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Fuzz untrusted retry headers
env:
JAZZER_FUZZ: "1"
run: >-
./gradlew
:x-twitter-scraper-java-core:test
--tests '*RetryAfterFuzzTest'
--no-build-cache
--no-configuration-cache
supply-chain:
name: Dependency & Build Security
runs-on: ubuntu-24.04
timeout-minutes: 35
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: "26"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-cleanup: always
- name: Audit dependencies and licenses
run: ./scripts/audit
- name: Verify reproducible Maven artifacts
run: ./scripts/check-reproducible
- name: Upload dependency license evidence
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: java-dependency-licenses
path: build/reports/dependency-license
retention-days: 14