name: ci on: pull_request: {} push: { branches: [main] } jobs: build-test: runs-on: ubuntu-latest timeout-minutes: 10 env: NODE_OPTIONS: --max-old-space-size=4096 steps: - name: Checkout repository uses: actions/checkout@v5 - name: Setup pnpm uses: pnpm/action-setup@v4 with: run_install: false - name: Setup Node.js uses: actions/setup-node@v5 with: node-version: 22 - name: Install dependencies run: pnpm install --frozen-lockfile # build_npm_package.py requires DotSlash when staging releases. - uses: facebook/install-dotslash@v2 - name: Stage npm package id: stage_npm_package env: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail CODEX_VERSION=0.40.0 PACK_OUTPUT="${RUNNER_TEMP}/codex-npm.tgz" python3 ./codex-cli/scripts/build_npm_package.py \ --release-version "$CODEX_VERSION" \ --pack-output "$PACK_OUTPUT" echo "pack_output=$PACK_OUTPUT" >> "$GITHUB_OUTPUT" - name: Upload staged npm package artifact uses: actions/upload-artifact@v4 with: name: codex-npm-staging path: ${{ steps.stage_npm_package.outputs.pack_output }} - name: Ensure root README.md contains only ASCII and certain Unicode code points run: ./scripts/asciicheck.py README.md - name: Check root README ToC run: python3 scripts/readme_toc.py README.md - name: Ensure codex-cli/README.md contains only ASCII and certain Unicode code points run: ./scripts/asciicheck.py codex-cli/README.md - name: Check codex-cli/README ToC run: python3 scripts/readme_toc.py codex-cli/README.md