As promised on https://github.com/openai/codex/discussions/1405, we are making the first official release of the Rust CLI as v0.2.0. As part of this move, we are making it available in Homebrew: https://github.com/Homebrew/homebrew-core/pull/228615 Ultimately, we also plan to continue to make the CLI available in npm, as well, though brew is a bit nicer in that `brew install` will download only the binary for your platform whereas an npm module is expected to contain the binaries for _all_ supported platforms, so it is a bit more heavyweight. A big part of this change is updating the root `README.md` to document the behavior of the Rust CLI, which differs in a number of ways from the TypeScript CLI. The existing `README.md` is moved to `codex-cli/README.md` as part of this PR, as it is still applicable to that folder. As this is still early days for the Rust CLI, I encourage folks to provide feedback on the command line flags and configuration options.
86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
name: ci
|
|
|
|
on:
|
|
pull_request: { branches: [main] }
|
|
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@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.8.1
|
|
run_install: false
|
|
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: |
|
|
echo "store_path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup pnpm cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.pnpm-cache.outputs.store_path }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
# Run all tasks using workspace filters
|
|
|
|
- name: Check TypeScript code formatting
|
|
working-directory: codex-cli
|
|
run: pnpm run format
|
|
|
|
- name: Check Markdown and config file formatting
|
|
run: pnpm run format
|
|
|
|
- name: Run tests
|
|
run: pnpm run test
|
|
|
|
- name: Lint
|
|
run: |
|
|
pnpm --filter @openai/codex exec -- eslint src tests --ext ts --ext tsx \
|
|
--report-unused-disable-directives \
|
|
--rule "no-console:error" \
|
|
--rule "no-debugger:error" \
|
|
--max-warnings=-1
|
|
|
|
- name: Type-check
|
|
run: pnpm run typecheck
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Ensure staging a release works.
|
|
working-directory: codex-cli
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: pnpm stage-release
|
|
|
|
- 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
|