This check was lost in https://github.com/openai/codex/pull/287. Both the root folder and `codex-cli/` have their own `pnpm format` commands that check the formatting of different things. Also ran `pnpm format:fix` to fix the formatting violations that got in while this was disabled in CI. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/417). * #420 * #419 * #416 * __->__ #417
70 lines
1.7 KiB
YAML
70 lines
1.7 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
|