@@ -13,193 +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 : |
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"
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 : |
43
+ echo " USER: $USER"
44
+ echo " USE_DOCKER_SERVICE: $USE_DOCKER_SERVICE"
45
+ ./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'
52
52
53
53
unit_test_jdk8 :
54
54
name : Unit test with docker service [JDK8]
55
55
runs-on : ubuntu-latest-16-cores
56
56
timeout-minutes : 30
57
57
steps :
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"
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'
137
137
138
138
unit_test_cloud :
139
139
name : Unit test with cloud
140
140
runs-on : ubuntu-latest
141
141
timeout-minutes : 30
142
142
steps :
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"
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'
176
176
177
177
code_format :
178
178
name : Code format
179
179
runs-on : ubuntu-latest
180
180
timeout-minutes : 20
181
181
steps :
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 }}
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
188
189
- - name : Set up Java
190
- uses : actions/setup-java@v4
191
- with :
192
- java-version : " 11"
193
- distribution : " temurin"
189
+ - name : Set up Java
190
+ uses : actions/setup-java@v4
191
+ with :
192
+ java-version : " 11"
193
+ distribution : " temurin"
194
194
195
- - name : Set up Gradle
196
- uses : gradle/actions/setup-gradle@v4
195
+ - name : Set up Gradle
196
+ uses : gradle/actions/setup-gradle@v4
197
197
198
- - name : Run copyright and code format checks
199
- run : ./gradlew --no-daemon spotlessCheck
198
+ - name : Run copyright and code format checks
199
+ run : ./gradlew --no-daemon spotlessCheck
200
200
201
201
build_native_images :
202
202
name : Build native test server
203
203
uses : ./.github/workflows/build-native-image.yml
204
204
with :
205
- ref : ${{ github.event.pull_request.head.sha }}
205
+ ref : ${{ github.event.pull_request.head.sha }}
0 commit comments