Skip to content

Commit b3ebe4c

Browse files
committed
ci(sdk): verify runtime on node 18
1 parent 3eced8b commit b3ebe4c

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

‎.github/workflows/ci-gates.yml‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
main-script: pnpm run test --ci
183183

184184
test-node18:
185-
name: 'Test (Node.js 18.20.8)'
185+
name: 'Runtime (Node.js 18.20.8)'
186186
runs-on: ubuntu-26.04
187187
timeout-minutes: 15
188188
steps:
@@ -210,14 +210,25 @@ jobs:
210210
- name: 'Set up and install'
211211
uses: ./.github/actions/fleet/setup-and-install
212212
with:
213-
node-version: '18.20.8'
214213
socket-api-token: ${{ secrets.SOCKET_API_TOKEN_FOR_CLI_AND_SFW }}
215214
payload-token-client-id: ${{ secrets.SOCKET_RELEASE_CLIENT_ID || vars.SOCKET_RELEASE_CLIENT_ID }}
216215
payload-token-private-key: ${{ secrets.SOCKET_RELEASE_APP_PRIVATE_KEY }}
217-
- name: 'Run tests'
216+
- name: 'Build SDK'
218217
uses: ./.github/actions/fleet/run-script
219218
env:
220219
GH_TOKEN: ${{ github.token }}
221220
with:
222221
setup-script: pnpm run build
223-
main-script: pnpm run test --ci
222+
main-script: node -e 'process.stdout.write(`Build completed under Node ${process.versions.node}\\n`)'
223+
- name: 'Set up Node.js 18.20.8'
224+
uses: ./.github/actions/fleet/setup
225+
with:
226+
node-version: '18.20.8'
227+
socket-api-token: ${{ secrets.SOCKET_API_TOKEN_FOR_CLI_AND_SFW }}
228+
- name: 'Verify SDK runtime'
229+
uses: ./.github/actions/fleet/run-script
230+
with:
231+
main-script: >-
232+
node --input-type=module -e 'import { SocketSdk } from "./dist/index.js";
233+
if (typeof SocketSdk !== "function") throw new TypeError("SocketSdk export is not callable");
234+
process.stdout.write(`SocketSdk loaded under Node ${process.versions.node}\\n`);'

0 commit comments

Comments
 (0)