1919
2020 # Use these variables to force specific version of CLI/Time Skipping Server for SDK tests
2121 # TESTS_CLI_VERSION: 'v0.13.2'
22+ TESTS_CLI_VERSION : ' v1.3.1-persistence-fix.0'
2223 # TESTS_TIME_SKIPPING_SERVER_VERSION: 'v1.24.1'
2324
2425jobs :
@@ -129,14 +130,6 @@ jobs:
129130 - platform : windows-x64
130131 runner : windows-latest
131132 reuse-v8-context : true
132- # Node 22.12.0 on Windows incorrectly resolves `localhost` to `::1`, rather than both `::1` and `127.0.0.1`.
133- # We changed all of our internal tests to exclusively use `127.0.0.1`, but samples are still written to use
134- # `localhost`, which really is the proper thing to do in samples. So until this gets fixed upstream, we force
135- # the last known good version of Node on Windows.
136- # See https://github.com/nodejs/node/issues/56137 (_resolved_ already, but not yet released).
137- - platform : windows-x64
138- node : 22
139- node-release-override : 22.11.0
140133 runs-on : ${{ matrix.runner }}
141134 name : Run Integration Tests (${{ matrix.platform }}, Node ${{ matrix.node }}, Reuse V8 Context ${{ matrix.reuse-v8-context }})
142135 defaults :
@@ -212,25 +205,28 @@ jobs:
212205 --sqlite-pragma synchronous=OFF \
213206 --headless &> ./devserver.log &
214207
215- # We write the certs to disk because it serves the sample. Written into /tmp/temporal-certs
216- - name : Create certs dir
217- run : node scripts/create-certs-dir.js ${{ steps.tmp-dir.outputs.dir }}/certs
218- if : ${{ vars.TEMPORAL_CLIENT_NAMESPACE != '' }}
219- env :
220- TEMPORAL_CLIENT_CERT : ${{ secrets.TEMPORAL_CLIENT_CERT }}
221- TEMPORAL_CLIENT_KEY : ${{ secrets.TEMPORAL_CLIENT_KEY }}
222-
223208 - name : Run Tests
224- run : npm test
209+ run : npm run test
225210 env :
226211 RUN_INTEGRATION_TESTS : true
227212 REUSE_V8_CONTEXT : ${{ matrix.reuse-v8-context }}
228213
229- # Cloud Tests will be skipped if TEMPORAL_CLIENT_CLOUD_API_KEY is left empty
230- TEMPORAL_CLOUD_SAAS_ADDRESS : ${{ vars.TEMPORAL_CLOUD_SAAS_ADDRESS || 'saas-api.tmprl.cloud:443' }}
231- TEMPORAL_CLIENT_CLOUD_API_KEY : ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
232- TEMPORAL_CLIENT_CLOUD_API_VERSION : 2024-05-13-00
233- TEMPORAL_CLIENT_CLOUD_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
214+ # For Temporal Cloud + mTLS tests
215+ TEMPORAL_CLOUD_MTLS_TEST_TARGET_HOST : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud:7233
216+ TEMPORAL_CLOUD_MTLS_TEST_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
217+ TEMPORAL_CLOUD_MTLS_TEST_CLIENT_CERT : ${{ secrets.TEMPORAL_CLIENT_CERT }}
218+ TEMPORAL_CLOUD_MTLS_TEST_CLIENT_KEY : ${{ secrets.TEMPORAL_CLIENT_KEY }}
219+
220+ # For Temporal Cloud + API key tests
221+ TEMPORAL_CLOUD_API_KEY_TEST_TARGET_HOST : us-west-2.aws.api.temporal.io:7233
222+ TEMPORAL_CLOUD_API_KEY_TEST_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
223+ TEMPORAL_CLOUD_API_KEY_TEST_API_KEY : ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
224+
225+ # For Temporal Cloud + Cloud Ops tests
226+ TEMPORAL_CLOUD_OPS_TEST_TARGET_HOST : saas-api.tmprl.cloud:443
227+ TEMPORAL_CLOUD_OPS_TEST_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
228+ TEMPORAL_CLOUD_OPS_TEST_API_KEY : ${{ secrets.TEMPORAL_CLIENT_CLOUD_API_KEY }}
229+ TEMPORAL_CLOUD_OPS_TEST_API_VERSION : 2024-05-13-00
234230
235231 # FIXME: Move samples tests to a custom activity
236232 # Sample 1: hello-world to local server
@@ -241,17 +237,30 @@ jobs:
241237
242238 # Sample 2: hello-world-mtls to cloud server
243239 - name : Instantiate sample project using verdaccio artifacts - Hello World MTLS
244- if : ${{ vars.TEMPORAL_CLIENT_NAMESPACE != '' }}
245240 run : |
241+ if [ -z "$TEMPORAL_ADDRESS" ] || [ -z "$TEMPORAL_NAMESPACE" ] || [ -z "$TEMPORAL_CLIENT_CERT" ] || [ -z "$TEMPORAL_CLIENT_KEY" ]; then
242+ echo "Skipping hello-world-mtls sample test as required environment variables are not set"
243+ exit 0
244+ fi
245+
246+ node scripts/create-certs-dir.js ${{ steps.tmp-dir.outputs.dir }}/certs
246247 node scripts/init-from-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world-mtls --target-dir ${{ steps.tmp-dir.outputs.dir }}/sample-hello-world-mtls
247248 node scripts/test-example.js --work-dir "${{ steps.tmp-dir.outputs.dir }}/sample-hello-world-mtls"
248249 env :
249250 # These env vars are used by the hello-world-mtls sample
250- TEMPORAL_ADDRESS : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud
251+ TEMPORAL_ADDRESS : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}.tmprl.cloud:7233
251252 TEMPORAL_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
253+ TEMPORAL_CLIENT_CERT : ${{ secrets.TEMPORAL_CLIENT_CERT }}
254+ TEMPORAL_CLIENT_KEY : ${{ secrets.TEMPORAL_CLIENT_KEY }}
255+ TEMPORAL_TASK_QUEUE : ${{ format('tssdk-ci-{0}-{1}-sample-hello-world-mtls-{2}-{3}', matrix.platform, matrix.node, github.run_id, github.run_attempt) }}
256+
252257 TEMPORAL_CLIENT_CERT_PATH : ${{ steps.tmp-dir.outputs.dir }}/certs/client.pem
253258 TEMPORAL_CLIENT_KEY_PATH : ${{ steps.tmp-dir.outputs.dir }}/certs/client.key
254- TEMPORAL_TASK_QUEUE : ${{ format('{0}-{1}-sample-hello-world-mtls', matrix.platform, matrix.node) }}
259+
260+ - name : Destroy certs dir
261+ if : always()
262+ run : rm -rf ${{ steps.tmp-dir.outputs.dir }}/certs
263+ continue-on-error : true
255264
256265 # Sample 3: fetch-esm to local server
257266 - name : Instantiate sample project using verdaccio artifacts - Fetch ESM
@@ -261,11 +270,6 @@ jobs:
261270
262271 # End samples
263272
264- - name : Destroy certs dir
265- if : always()
266- run : rm -rf ${{ steps.tmp-dir.outputs.dir }}/certs
267- continue-on-error : true
268-
269273 - name : Upload NPM logs
270274 uses : actions/upload-artifact@v4
271275 if : failure() || cancelled()
@@ -293,7 +297,7 @@ jobs:
293297 typescript-repo-path : ${{github.event.pull_request.head.repo.full_name}}
294298 version : ${{github.event.pull_request.head.ref}}
295299 version-is-repo-ref : true
296- features-repo-ref : sdk-1403-ts-startUpdate-require-wait-stage
300+ features-repo-ref : main
297301
298302 stress-tests-no-reuse-context :
299303 name : Stress Tests (No Reuse V8 Context)
@@ -322,3 +326,5 @@ jobs:
322326 secrets :
323327 ALGOLIA_API_KEY : ${{ secrets.ALGOLIA_API_KEY }}
324328 VERCEL_TOKEN : ${{ secrets.VERCEL_TOKEN }}
329+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
330+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
0 commit comments