@@ -13,190 +13,193 @@ jobs:
13
13
runs-on : ubuntu-latest-16-cores
14
14
timeout-minutes : 30
15
15
steps :
16
- - name : Checkout repo
17
- uses : actions/checkout@v4
18
- with :
19
- fetch-depth : 0
20
- submodules : recursive
21
- ref : ${{ github.event.pull_request.head.sha }}
22
-
23
- - name : Set up Java
24
- uses : actions/setup-java@v4
25
- with :
26
- java-version : " 23"
27
- distribution : " temurin"
28
-
29
- - name : Set up Gradle
30
- uses : gradle/actions/setup-gradle@v4
31
-
32
- - name : Run unit tests
33
- env :
34
- USER : unittest
35
- # USE_DOCKER_SERVICE: false
36
- run : ./gradlew --no-daemon test -x spotlessCheck -x spotlessApply -x spotlessJava -P edgeDepsTest
37
-
38
- - name : Run independent resource tuner test
39
- env :
40
- USER : unittest
41
- USE_DOCKER_SERVICE : false
42
- run : ./gradlew --no-daemon temporal-sdk:testResourceIndependent -x spotlessCheck -x spotlessApply -x spotlessJava -P edgeDepsTest
43
-
44
- - name : Publish Test Report
45
- uses : mikepenz/action-junit-report@v5
46
- if : success() || failure() # always run even if the previous step fails
47
- with :
48
- report_paths : ' **/build/test-results/test/TEST-*.xml'
16
+ - name : Checkout repo
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+ submodules : recursive
21
+ ref : ${{ github.event.pull_request.head.sha }}
22
+
23
+ - name : Set up Java
24
+ uses : actions/setup-java@v4
25
+ with :
26
+ java-version : " 23"
27
+ distribution : " temurin"
28
+
29
+ - name : Set up Gradle
30
+ uses : gradle/actions/setup-gradle@v4
31
+
32
+ - name : Run unit tests
33
+ env :
34
+ USER : unittest
35
+ USE_DOCKER_SERVICE : false
36
+ run : |
37
+ echo "use docker service:$USE_DOCKER_SERVICE"
38
+ echo "user $USER"
39
+ ./gradlew --no-daemon test -x spotlessCheck -x spotlessApply -x spotlessJava -P edgeDepsTest
40
+
41
+ - name : Run independent resource tuner test
42
+ env :
43
+ USER : unittest
44
+ USE_DOCKER_SERVICE : false
45
+ run : ./gradlew --no-daemon temporal-sdk:testResourceIndependent -x spotlessCheck -x spotlessApply -x spotlessJava -P edgeDepsTest
46
+
47
+ - name : Publish Test Report
48
+ uses : mikepenz/action-junit-report@v5
49
+ if : success() || failure() # always run even if the previous step fails
50
+ with :
51
+ report_paths : " **/build/test-results/test/TEST-*.xml"
49
52
50
53
unit_test_jdk8 :
51
54
name : Unit test with docker service [JDK8]
52
55
runs-on : ubuntu-latest-16-cores
53
56
timeout-minutes : 30
54
57
steps :
55
- - name : Checkout repo
56
- uses : actions/checkout@v4
57
- with :
58
- fetch-depth : 0
59
- submodules : recursive
60
- ref : ${{ github.event.pull_request.head.sha }}
61
-
62
- - name : Set up Java
63
- uses : actions/setup-java@v4
64
- with :
65
- java-version : |
66
- 23
67
- 11
68
- distribution : " temurin"
69
-
70
- - name : Set up Gradle
71
- uses : gradle/actions/setup-gradle@v4
72
-
73
- - name : Start containerized server and dependencies
74
- env :
75
- TEMPORAL_CLI_VERSION : 1.4.0
76
- run : |
77
- wget -O temporal_cli.tar.gz https://github.com/temporalio/cli/releases/download/v${TEMPORAL_CLI_VERSION}/temporal_cli_${TEMPORAL_CLI_VERSION}_linux_amd64.tar.gz
78
- tar -xzf temporal_cli.tar.gz
79
- chmod +x temporal
80
- ./temporal server start-dev \
81
- --headless \
82
- --port 7233 \
83
- --http-port 7243 \
84
- --namespace UnitTest \
85
- --db-filename temporal.sqlite \
86
- --sqlite-pragma journal_mode=WAL \
87
- --sqlite-pragma synchronous=OFF \
88
- --search-attribute CustomKeywordField=Keyword \
89
- --search-attribute CustomStringField=Text \
90
- --search-attribute CustomTextField=Text \
91
- --search-attribute CustomIntField=Int \
92
- --search-attribute CustomDatetimeField=Datetime \
93
- --search-attribute CustomDoubleField=Double \
94
- --search-attribute CustomBoolField=Bool \
95
- --dynamic-config-value system.forceSearchAttributesCacheRefreshOnRead=true \
96
- --dynamic-config-value system.enableActivityEagerExecution=true \
97
- --dynamic-config-value system.enableEagerWorkflowStart=true \
98
- --dynamic-config-value system.enableExecuteMultiOperation=true \
99
- --dynamic-config-value frontend.enableUpdateWorkflowExecutionAsyncAccepted=true \
100
- --dynamic-config-value history.MaxBufferedQueryCount=100000 \
101
- --dynamic-config-value frontend.workerVersioningDataAPIs=true \
102
- --dynamic-config-value worker.buildIdScavengerEnabled=true \
103
- --dynamic-config-value frontend.workerVersioningRuleAPIs=true \
104
- --dynamic-config-value worker.removableBuildIdDurationSinceDefault=true \
105
- --dynamic-config-value matching.useNewMatcher=true \
106
- --dynamic-config-value system.refreshNexusEndpointsMinWait=1000 \
107
- --dynamic-config-value component.callbacks.allowedAddresses='[{"Pattern":"*","AllowInsecure":true}]' \
108
- --dynamic-config-value component.nexusoperations.recordCancelRequestCompletionEvents=true \
109
- --dynamic-config-value frontend.workerVersioningWorkflowAPIs=true \
110
- --dynamic-config-value frontend.activityAPIsEnabled=true \
111
- --dynamic-config-value system.enableDeploymentVersions=true \
112
- --dynamic-config-value history.enableRequestIdRefLinks=true &
113
- sleep 10s
114
-
115
- - name : Run unit tests
116
- env :
117
- USER : unittest
118
- TEMPORAL_SERVICE_ADDRESS : localhost:7233
119
- USE_DOCKER_SERVICE : true
120
- run : ./gradlew --no-daemon test -x spotlessCheck -x spotlessApply -x spotlessJava
121
-
122
- - name : Run virtual thread tests
123
- env :
124
- USER : unittest
125
- TEMPORAL_SERVICE_ADDRESS : localhost:7233
126
- USE_DOCKER_SERVICE : true
127
- run : ./gradlew --no-daemon :temporal-sdk:virtualThreadTests -x spotlessCheck -x spotlessApply -x spotlessJava
128
-
129
- - name : Publish Test Report
130
- uses : mikepenz/action-junit-report@v5
131
- if : success() || failure() # always run even if the previous step fails
132
- with :
133
- report_paths : ' **/build/test-results/test/TEST-*.xml'
58
+ - name : Checkout repo
59
+ uses : actions/checkout@v4
60
+ with :
61
+ fetch-depth : 0
62
+ submodules : recursive
63
+ ref : ${{ github.event.pull_request.head.sha }}
64
+
65
+ - name : Set up Java
66
+ uses : actions/setup-java@v4
67
+ with :
68
+ java-version : |
69
+ 23
70
+ 11
71
+ distribution : " temurin"
72
+
73
+ - name : Set up Gradle
74
+ uses : gradle/actions/setup-gradle@v4
75
+
76
+ - name : Start containerized server and dependencies
77
+ env :
78
+ TEMPORAL_CLI_VERSION : 1.4.0
79
+ run : |
80
+ wget -O temporal_cli.tar.gz https://github.com/temporalio/cli/releases/download/v${TEMPORAL_CLI_VERSION}/temporal_cli_${TEMPORAL_CLI_VERSION}_linux_amd64.tar.gz
81
+ tar -xzf temporal_cli.tar.gz
82
+ chmod +x temporal
83
+ ./temporal server start-dev \
84
+ --headless \
85
+ --port 7233 \
86
+ --http-port 7243 \
87
+ --namespace UnitTest \
88
+ --db-filename temporal.sqlite \
89
+ --sqlite-pragma journal_mode=WAL \
90
+ --sqlite-pragma synchronous=OFF \
91
+ --search-attribute CustomKeywordField=Keyword \
92
+ --search-attribute CustomStringField=Text \
93
+ --search-attribute CustomTextField=Text \
94
+ --search-attribute CustomIntField=Int \
95
+ --search-attribute CustomDatetimeField=Datetime \
96
+ --search-attribute CustomDoubleField=Double \
97
+ --search-attribute CustomBoolField=Bool \
98
+ --dynamic-config-value system.forceSearchAttributesCacheRefreshOnRead=true \
99
+ --dynamic-config-value system.enableActivityEagerExecution=true \
100
+ --dynamic-config-value system.enableEagerWorkflowStart=true \
101
+ --dynamic-config-value system.enableExecuteMultiOperation=true \
102
+ --dynamic-config-value frontend.enableUpdateWorkflowExecutionAsyncAccepted=true \
103
+ --dynamic-config-value history.MaxBufferedQueryCount=100000 \
104
+ --dynamic-config-value frontend.workerVersioningDataAPIs=true \
105
+ --dynamic-config-value worker.buildIdScavengerEnabled=true \
106
+ --dynamic-config-value frontend.workerVersioningRuleAPIs=true \
107
+ --dynamic-config-value worker.removableBuildIdDurationSinceDefault=true \
108
+ --dynamic-config-value matching.useNewMatcher=true \
109
+ --dynamic-config-value system.refreshNexusEndpointsMinWait=1000 \
110
+ --dynamic-config-value component.callbacks.allowedAddresses='[{"Pattern":"*","AllowInsecure":true}]' \
111
+ --dynamic-config-value component.nexusoperations.recordCancelRequestCompletionEvents=true \
112
+ --dynamic-config-value frontend.workerVersioningWorkflowAPIs=true \
113
+ --dynamic-config-value frontend.activityAPIsEnabled=true \
114
+ --dynamic-config-value system.enableDeploymentVersions=true \
115
+ --dynamic-config-value history.enableRequestIdRefLinks=true &
116
+ sleep 10s
117
+
118
+ - name : Run unit tests
119
+ env :
120
+ USER : unittest
121
+ TEMPORAL_SERVICE_ADDRESS : localhost:7233
122
+ USE_DOCKER_SERVICE : true
123
+ run : ./gradlew --no-daemon test -x spotlessCheck -x spotlessApply -x spotlessJava
124
+
125
+ - name : Run virtual thread tests
126
+ env :
127
+ USER : unittest
128
+ TEMPORAL_SERVICE_ADDRESS : localhost:7233
129
+ USE_DOCKER_SERVICE : true
130
+ run : ./gradlew --no-daemon :temporal-sdk:virtualThreadTests -x spotlessCheck -x spotlessApply -x spotlessJava
131
+
132
+ - name : Publish Test Report
133
+ uses : mikepenz/action-junit-report@v5
134
+ if : success() || failure() # always run even if the previous step fails
135
+ with :
136
+ report_paths : " **/build/test-results/test/TEST-*.xml"
134
137
135
138
unit_test_cloud :
136
139
name : Unit test with cloud
137
140
runs-on : ubuntu-latest
138
141
timeout-minutes : 30
139
142
steps :
140
- - name : Checkout repo
141
- uses : actions/checkout@v4
142
- with :
143
- fetch-depth : 0
144
- submodules : recursive
145
- ref : ${{ github.event.pull_request.head.sha }}
146
-
147
- - name : Set up Java
148
- uses : actions/setup-java@v4
149
- with :
150
- java-version : " 11"
151
- distribution : " temurin"
152
-
153
- - name : Set up Gradle
154
- uses : gradle/actions/setup-gradle@v4
155
-
156
- - name : Run cloud test
157
- # Only supported in non-fork runs, since secrets are not available in forks. We intentionally
158
- # are only doing this check on the step instead of the job so we require job passing in CI
159
- # even for those that can't run this step.
160
- if : ${{ github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-java' }}
161
- env :
162
- USER : unittest
163
- TEMPORAL_CLIENT_CLOUD_NAMESPACE : sdk-ci.a2dd6
164
- TEMPORAL_CLIENT_CLOUD_API_KEY : ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
165
- TEMPORAL_CLIENT_CLOUD_API_VERSION : 2024-05-13-00
166
- run : ./gradlew --no-daemon :temporal-sdk:test --tests '*CloudOperationsClientTest'
167
-
168
- - name : Publish Test Report
169
- uses : mikepenz/action-junit-report@v5
170
- if : success() || failure() # always run even if the previous step fails
171
- with :
172
- report_paths : ' **/build/test-results/test/TEST-*.xml'
143
+ - name : Checkout repo
144
+ uses : actions/checkout@v4
145
+ with :
146
+ fetch-depth : 0
147
+ submodules : recursive
148
+ ref : ${{ github.event.pull_request.head.sha }}
149
+
150
+ - name : Set up Java
151
+ uses : actions/setup-java@v4
152
+ with :
153
+ java-version : " 11"
154
+ distribution : " temurin"
155
+
156
+ - name : Set up Gradle
157
+ uses : gradle/actions/setup-gradle@v4
158
+
159
+ - name : Run cloud test
160
+ # Only supported in non-fork runs, since secrets are not available in forks. We intentionally
161
+ # are only doing this check on the step instead of the job so we require job passing in CI
162
+ # even for those that can't run this step.
163
+ if : ${{ github.event.pull_request.head.repo.full_name == '' || github.event.pull_request.head.repo.full_name == 'temporalio/sdk-java' }}
164
+ env :
165
+ USER : unittest
166
+ TEMPORAL_CLIENT_CLOUD_NAMESPACE : sdk-ci.a2dd6
167
+ TEMPORAL_CLIENT_CLOUD_API_KEY : ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
168
+ TEMPORAL_CLIENT_CLOUD_API_VERSION : 2024-05-13-00
169
+ run : ./gradlew --no-daemon :temporal-sdk:test --tests '*CloudOperationsClientTest'
170
+
171
+ - name : Publish Test Report
172
+ uses : mikepenz/action-junit-report@v5
173
+ if : success() || failure() # always run even if the previous step fails
174
+ with :
175
+ report_paths : " **/build/test-results/test/TEST-*.xml"
173
176
174
177
code_format :
175
178
name : Code format
176
179
runs-on : ubuntu-latest
177
180
timeout-minutes : 20
178
181
steps :
179
- - name : Checkout repo
180
- uses : actions/checkout@v4
181
- with :
182
- fetch-depth : 0
183
- submodules : recursive
184
- ref : ${{ github.event.pull_request.head.sha }}
185
-
186
- - name : Set up Java
187
- uses : actions/setup-java@v4
188
- with :
189
- java-version : " 11"
190
- distribution : " temurin"
191
-
192
- - name : Set up Gradle
193
- uses : gradle/actions/setup-gradle@v4
194
-
195
- - name : Run copyright and code format checks
196
- run : ./gradlew --no-daemon spotlessCheck
197
-
182
+ - name : Checkout repo
183
+ uses : actions/checkout@v4
184
+ with :
185
+ fetch-depth : 0
186
+ submodules : recursive
187
+ ref : ${{ github.event.pull_request.head.sha }}
188
+
189
+ - name : Set up Java
190
+ uses : actions/setup-java@v4
191
+ with :
192
+ java-version : " 11"
193
+ distribution : " temurin"
194
+
195
+ - name : Set up Gradle
196
+ uses : gradle/actions/setup-gradle@v4
197
+
198
+ - name : Run copyright and code format checks
199
+ run : ./gradlew --no-daemon spotlessCheck
200
+
198
201
build_native_images :
199
202
name : Build native test server
200
203
uses : ./.github/workflows/build-native-image.yml
201
204
with :
202
- ref : ${{ github.event.pull_request.head.sha }}
205
+ ref : ${{ github.event.pull_request.head.sha }}
0 commit comments