-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (138 loc) · 4.56 KB
/
ci.yml
File metadata and controls
150 lines (138 loc) · 4.56 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
name: ci
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
- "docs/diagrams/**" # diagrams workflow owns these
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
- "docs/diagrams/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build:
name: build (JDK ${{ matrix.jdk }})
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
# 21 is the LTS floor (`--release 21`); 25 is the September 2025 LTS
# and matches the toolchain the local developer setup uses. Both must
# produce green tests on every PR.
jdk: ["21", "25"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v6
- name: Check formatting (Spotless)
if: ${{ matrix.jdk == '21' }}
run: ./gradlew spotlessCheck --no-daemon
- name: Build
run: |
if [[ "${{ matrix.jdk }}" == "21" ]]; then
./gradlew build --no-daemon --stacktrace
else
./gradlew build --no-daemon --stacktrace \
-x spotlessCheck \
-x spotlessJavaCheck \
-x spotlessJava
fi
- name: Run all runnable examples and recipes
run: |
./gradlew --no-daemon --stacktrace \
:examples:submit-and-stream:run \
:examples:cancel:run \
:examples:heartbeat:run \
:examples:cost-budget:run \
:examples:result-chunk:run \
:examples:agent-versions:run \
:examples:list-jobs:run \
:examples:lease-expires-at:run \
:examples:idempotent-retry:run \
:examples:custom-auth:run \
:examples:provisioned-credentials:run \
:examples:ack-backpressure:run \
:examples:delegate:run \
:examples:spring-boot:run \
:examples:jakarta:run \
:examples:lease-violation:run \
:examples:progress:run \
:examples:resume:run \
:examples:stdio:run \
:examples:subscribe:run \
:examples:tracing:run \
:examples:vendor-extensions:run \
:recipes:email-vendor-leases:run \
:recipes:mcp-skill:run \
:recipes:multi-agent-budget:run \
:recipes:stream-resume:run
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: test-reports-jdk${{ matrix.jdk }}
path: |
**/build/reports/tests/
**/build/test-results/
if-no-files-found: ignore
retention-days: 7
# Jacoco XML reports are emitted to **/build/reports/jacoco/test/
# because subprojects apply the jacoco plugin and Test is finalizedBy
# jacocoTestReport (see root build.gradle.kts). Upload from the LTS
# floor only — coverage is identical across JDKs. Non-blocking.
- name: Upload coverage to Codecov
if: matrix.jdk == '21'
# codecov/codecov-action v6.0.1
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
fail_ci_if_error: false
flags: unittests
files: "**/build/reports/jacoco/test/jacocoTestReport.xml"
token: ${{ secrets.CODECOV_TOKEN }}
javadoc:
name: javadoc
runs-on: ubuntu-24.04
needs: build
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
cache: gradle
- name: Build javadoc for all published modules
run: |
./gradlew --no-daemon \
:arcp-core:javadoc \
:arcp-client:javadoc \
:arcp-runtime:javadoc \
:arcp:javadoc \
:arcp-otel:javadoc \
:arcp-runtime-jetty:javadoc \
:arcp-middleware-jakarta:javadoc \
:arcp-middleware-spring-boot:javadoc \
:arcp-middleware-vertx:javadoc \
:arcp-tck:javadoc