Initial commit #898
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ⚡ CI | |
| # Dependencies: | |
| # - SocketDev/socket-registry/.github/workflows/ci.yml | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| node-versions: | |
| description: 'Node.js versions to test (JSON array)' | |
| required: false | |
| type: string | |
| # Default should match packages/build-infra/external-tools.json -> tools.node.versions.recommendedVersion | |
| default: '["24.11.1"]' | |
| permissions: | |
| contents: read | |
| jobs: | |
| versions: | |
| name: Load Tool Versions | |
| runs-on: ubuntu-latest | |
| outputs: | |
| node: ${{ steps.load.outputs.node }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: .node-version | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Load Node.js version from external-tools.json | |
| id: load | |
| run: | | |
| NODE_VERSION=$(jq -r '.tools.node.versions.recommendedVersion' packages/build-infra/external-tools.json) | |
| echo "node=[\"$NODE_VERSION\"]" >> $GITHUB_OUTPUT | |
| echo "Loaded Node.js: $NODE_VERSION" | |
| ci: | |
| name: Run CI Pipeline | |
| needs: versions | |
| uses: SocketDev/socket-registry/.github/workflows/ci.yml@4709a2443e5a036bb0cd94e5d1559f138f05994c # main | |
| with: | |
| lint-script: 'pnpm run lint' | |
| type-check-script: 'pnpm run check' | |
| # Note: binject build uses local checkpoints but doesn't leverage GitHub Actions cache in CI | |
| # For cached builds with GitHub Actions cache, use the dedicated binsuite.yml workflow | |
| # Setup script installs platform-specific dependencies and sets CC/CXX for Windows | |
| test-setup-script: 'bash .github/scripts/setup-build-env.sh' | |
| test-script: 'pnpm run test' | |
| node-versions: ${{ inputs.node-versions || needs.versions.outputs.node }} | |
| os-versions: '["ubuntu-latest", "macos-latest", "windows-latest"]' | |
| fail-fast: false | |
| max-parallel: 4 | |
| test-timeout-minutes: 45 |