[ImgBot] Optimize images #1
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: node-ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} / node-${{ matrix.node == '22.13.0' && '22' || matrix.node }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node: ["22.13.0"] | |
| include: | |
| - os: ubuntu-latest | |
| node: "24.0.0" | |
| - os: ubuntu-latest | |
| node: "24" | |
| - os: ubuntu-latest | |
| node: "26.0.0" | |
| - os: ubuntu-latest | |
| node: "26" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| package_json_file: sdk/typescript/package.json | |
| cache: true | |
| cache_dependency_path: sdk/typescript/pnpm-lock.yaml | |
| - name: Set up Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| cache-dependency-path: sdk/typescript/pnpm-lock.yaml | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | |
| with: | |
| bun-version: "1.3.14" | |
| - name: Install dependencies | |
| run: pnpm --dir sdk/typescript install --frozen-lockfile | |
| - name: Audit production dependencies | |
| if: matrix.os == 'ubuntu-latest' && matrix.node == '22.13.0' | |
| run: pnpm --dir sdk/typescript run audit:prod | |
| - name: Typecheck | |
| run: pnpm --dir sdk/typescript run types | |
| - name: Test | |
| timeout-minutes: 10 | |
| env: | |
| TEMP: ${{ runner.temp }} | |
| TMP: ${{ runner.temp }} | |
| TMPDIR: ${{ runner.temp }} | |
| run: pnpm --dir sdk/typescript run test | |
| - name: Check formatting | |
| run: pnpm --dir sdk/typescript run format | |
| - name: Build | |
| run: pnpm --dir sdk/typescript run build | |
| - name: Pack | |
| working-directory: sdk/typescript | |
| run: pnpm pack --pack-destination ../../dist | |
| - name: Inspect package | |
| working-directory: sdk/typescript | |
| shell: bash | |
| run: pnpm run check:package ../../dist/*.tgz | |
| - name: Smoke-test Node.js runtime | |
| working-directory: sdk/typescript | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| node --input-type=module --eval ' | |
| import { CodexSecurity } from "@openai/codex-security"; | |
| if (typeof CodexSecurity !== "function") { | |
| throw new Error("The SDK does not export CodexSecurity."); | |
| } | |
| ' | |
| node bin/codex-security.mjs --version | |
| node bin/codex-security.mjs --help |