Skip to content

refactor(wasm): update unified bundle output path #349

refactor(wasm): update unified bundle output path

refactor(wasm): update unified bundle output path #349

Workflow file for this run

name: 🚀 CI Pipeline
# Dependencies:
# - SocketDev/socket-registry/.github/workflows/ci.yml
on:
push:
branches: [main]
tags: ['*']
paths:
- 'packages/cli/**'
- 'pnpm-lock.yaml'
- 'package.json'
- '.github/workflows/ci.yml'
pull_request:
branches: [main]
paths:
- 'packages/cli/**'
- 'pnpm-lock.yaml'
- 'package.json'
- '.github/workflows/ci.yml'
workflow_dispatch:
inputs:
skip-tests:
description: 'Skip test execution'
required: false
type: boolean
default: false
node-versions:
description: 'Node.js versions to test (JSON array)'
required: false
type: string
default: '[20, 22, 24]'
permissions:
contents: read
jobs:
ci:
name: Run CI Pipeline
uses: SocketDev/socket-registry/.github/workflows/ci.yml@d8ff3b0581d799466cfbf150f715c1a4bf9f84a5 # 2025-10-23
with:
test-setup-script: 'echo "=== Build Setup Debug ===" && pwd && echo "Before build:" && (ls -la packages/cli/ 2>/dev/null || dir packages\\cli\\ || true) && pnpm --filter @socketsecurity/cli run build && echo "After build:" && (ls -la packages/cli/dist/ 2>/dev/null || dir packages\\cli\\dist\\ || true) && echo "Checking cli.js:" && (ls -la packages/cli/dist/cli.js 2>/dev/null || dir packages\\cli\\dist\\cli.js || true) && echo "=== Build Setup Complete ==="'
lint-script: 'pnpm --filter @socketsecurity/cli run check'
type-check-script: 'pnpm --filter @socketsecurity/cli run type'
test-script: ${{ inputs.skip-tests && 'echo "Tests skipped"' || 'pnpm --filter @socketsecurity/cli run test:unit' }}
node-versions: ${{ inputs.node-versions || '[20, 22, 24]' }}
os-versions: '["ubuntu-latest", "macos-latest", "windows-latest"]'
fail-fast: false
e2e:
name: E2E Tests
needs: ci
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: true
matrix:
node-version: ${{ fromJSON(inputs.node-versions || '[20, 22, 24]') }}
os: [ubuntu-latest]
steps:
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@51be85d39d3b4a42dd9d4712948b9d30a2e04794
with:
node-version: ${{ matrix.node-version }}
- name: Generate build cache key
id: build-cache-key
shell: bash
run: |
HASH=$(find build/patches scripts -type f \( -name "*.patch" -o -name "*.mjs" \) | sort | xargs shasum -a 256 | shasum -a 256 | cut -d' ' -f1)
echo "hash=$HASH" >> $GITHUB_OUTPUT
- name: Restore smol binary cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: packages/node-smol-builder/dist/socket-smol
key: node-binary-linux-x64-${{ steps.build-cache-key.outputs.hash }}
restore-keys: node-binary-linux-x64-
- name: Restore SEA binary cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: packages/node-sea-builder/dist/socket-sea
key: sea-binary-linux-x64-${{ steps.build-cache-key.outputs.hash }}
restore-keys: sea-binary-linux-x64-
- name: Build CLI
working-directory: packages/cli
run: pnpm run build
- name: Run e2e tests
working-directory: packages/cli
env:
TEST_SEA_BINARY: '1'
TEST_SMOL_BINARY: '1'
SOCKET_CLI_API_TOKEN: ${{ secrets.SOCKET_CLI_API_TOKEN }}
run: pnpm run e2e-tests