@@ -105,84 +105,6 @@ jobs:
105105 # Actual file will be named ${{ matrix.target }}/index.node
106106 path : ./packages/core-bridge/releases/*/index.node
107107
108- # Gather native binaries for all platforms and build TypeScript @temporalio/* packages.
109- # Upload the built packages as a Verdaccio repository.
110- build-packages :
111- timeout-minutes : 10
112- needs :
113- - compile-native-binaries-debug
114- name : Build Packages
115- strategy :
116- # Using a matrix here ensure that Rust-related actions below can be easily be copied from the
117- # compile-binaries job and that the Rust build cache will be usable
118- matrix :
119- include :
120- - platform : linux-x64
121- runner : ubuntu-latest
122- target : x86_64-unknown-linux-gnu
123- runs-on : ${{ matrix.runner }}
124- defaults :
125- run :
126- shell : bash
127- steps :
128- - name : Checkout code
129- uses : actions/checkout@v4
130- with :
131- submodules : recursive
132-
133- - name : Download core-bridge native libraries
134- uses : actions/download-artifact@v4
135- with :
136- path : ./packages/core-bridge/releases/tmp
137-
138- - name : Put native files into place
139- working-directory : ./packages/core-bridge/releases
140- run : |
141- mv tmp/corebridge-native-debug-*/* ./
142- rm -rf tmp
143-
144- - name : Install Node
145- uses : actions/setup-node@v4
146- with :
147- node-version : 20
148-
149- - name : Get NPM cache directory
150- id : npm-cache-dir
151- run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
152-
153- - name : Restore NPM cache
154- uses : actions/cache/restore@v4
155- with :
156- path : ${{ steps.npm-cache-dir.outputs.dir }}
157- key : npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
158- restore-keys : |
159- npm-main-${{ matrix.platform }}-
160-
161- - name : Download dependencies
162- # Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors :(
163- run : |
164- npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
165-
166- - name : Compile code
167- run : npm run build -- --ignore @temporalio/core-bridge
168-
169- - name : Publish to Verdaccio
170- run : node scripts/publish-to-verdaccio.js --registry-dir ./tmp/registry
171-
172- - name : Save Verdaccio repo artifact
173- uses : actions/upload-artifact@v4
174- with :
175- name : verdaccio-repo
176- path : ./tmp/registry/storage
177-
178- - name : Save NPM cache
179- uses : actions/cache/save@v4
180- # Only saves NPM cache from the main branch, to reduce pressure on the cache (limited to 10GB).
181- if : ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
182- with :
183- path : ${{ steps.npm-cache-dir.outputs.dir }}
184- key : npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
185-
186108 # Run integration tests.
187109 # Uses the native binaries built in compile-native-binaries, but build `@temporalio/*` packages locally.
188110 # FIXME: Move ReuseV8Context vs non-ReuseV8Context out of the matrix, to the test script
@@ -282,6 +204,9 @@ jobs:
282204 TEMPORAL_CLIENT_CLOUD_API_VERSION : 2024-05-13-00
283205 TEMPORAL_CLIENT_CLOUD_NAMESPACE : ${{ vars.TEMPORAL_CLIENT_NAMESPACE }}
284206
207+ - name : Publish to Verdaccio
208+ run : node scripts/publish-to-verdaccio.js --registry-dir ./tmp/registry
209+
285210 # FIXME: Move samples tests to a custom activity
286211 # Sample 1: hello-world to local server
287212 - name : Instantiate sample project using verdaccio artifacts - Hello World
@@ -293,6 +218,7 @@ jobs:
293218 # Sample 2: hello-world-mtls to cloud server
294219 - name : Instantiate sample project using verdaccio artifacts - Hello World MTLS
295220 # Note: here, `npx create` fails on windows if shell is bash.
221+ if : ${{ vars.TEMPORAL_CLIENT_NAMESPACE != '' }}
296222 run : |
297223 node scripts/init-from-verdaccio.js --registry-dir ./tmp/registry --sample https://github.com/temporalio/samples-typescript/tree/main/hello-world-mtls --target-dir ${{ runner.temp }}/sample-hello-world-mtls
298224 node scripts/test-example.js --work-dir "${{ runner.temp }}/sample-hello-world-mtls"
0 commit comments