Skip to content

fix(runtime/codex): restore live streaming, close the gate's fallback #3536

fix(runtime/codex): restore live streaming, close the gate's fallback

fix(runtime/codex): restore live streaming, close the gate's fallback #3536

Workflow file for this run

# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Unit Tests
on:
push:
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
pull_request:
paths:
- '**.py'
- 'pyproject.toml'
- 'requirements*.txt'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv venv .venv
source .venv/bin/activate
uv sync --all-extras
uv pip install -e .
- name: Run unit tests with pytest
run: |
source .venv/bin/activate
# `codex_smoke` is excluded here rather than relying on its
# CODEX_RUN_SMOKE opt-in alone: it spawns a real Codex subprocess and
# binds two real loopback ports, which must never run under `-n 16`.
pytest -n 16 -m "not codex_smoke"
# Real Codex binary + real OS sandbox + real shim socket, against a stubbed
# model backend (no credentials, no network egress). Kept out of the matrix
# job above because it is serial and process-spawning.
#
# `continue-on-error` is deliberate for now: the CLI is pinned to an alpha
# (openai-codex-cli-bin==0.137.0a4) and whether the OS sandbox
# (landlock+seccomp on a GitHub runner) establishes at all is precisely the
# unknown this test exists to discover. Collect the signal first; drop the
# flag once it has been green for a while.
codex-smoke:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv venv .venv
source .venv/bin/activate
uv sync --all-extras
uv pip install -e .
- name: Run the Codex end-to-end smoke test
env:
CODEX_RUN_SMOKE: "1"
run: |
source .venv/bin/activate
# -p no:xdist: this test must not be distributed across workers.
# -rs: print skip reasons, so a silently skipped smoke test (missing
# SDK, missing binary, unsupported platform) is visible in the log.
pytest -m codex_smoke -p no:xdist -rs