Skip to content

Add Tab-toggled fullscreen help overlay, trim startup tips #1431

Add Tab-toggled fullscreen help overlay, trim startup tips

Add Tab-toggled fullscreen help overlay, trim startup tips #1431

Workflow file for this run

name: Quality Checks
on:
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
python-version: ['3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Setup uv virtual environment
run: uv venv
- name: Install dependencies
run: uv pip install -e .
- name: Install pexpect for integration tests
run: uv pip install pexpect>=4.9.0
- name: Provision CI model (lilac GLM-5.2 + Kimi K2.6)
# models.json ships empty. CI gets its model from extra_models.json,
# exactly like a real user would after running /add_model.
run: |
mkdir -p "$HOME/.code_puppy"
cat > "$HOME/.code_puppy/extra_models.json" <<'JSON'
{
"lilac-zai-org-glm-5.2": {
"type": "custom_openai",
"provider": "lilac",
"name": "zai-org/glm-5.2",
"custom_endpoint": {
"url": "https://api.getlilac.com/v1",
"api_key": "$LILAC_API_KEY"
},
"context_length": 524288,
"supported_settings": ["temperature", "seed", "top_p"]
},
"lilac-moonshotai-kimi-k2.6": {
"type": "custom_openai",
"provider": "lilac",
"name": "moonshotai/kimi-k2.6",
"custom_endpoint": {
"url": "https://api.getlilac.com/v1",
"api_key": "$LILAC_API_KEY"
},
"context_length": 262144,
"supported_settings": ["temperature", "seed", "top_p"]
}
}
JSON
# Tests isolate user config, and several fallback contracts require a
# non-empty bundled catalog.
cp "$HOME/.code_puppy/extra_models.json" code_puppy/models.json
echo "Wrote CI model catalog and test-only bundled fallback"
- name: Debug environment variables
env:
CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY || 'fake-key-for-ci-testing' }}
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY || 'fake-key-for-ci-testing' }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'fake-key-for-ci-testing' }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY || 'fake-key-for-ci-testing' }}
SYN_API_KEY: ${{ secrets.SYN_API_KEY || 'fake-key-for-ci-testing' }}
LILAC_API_KEY: ${{ secrets.LILAC_API_KEY || 'fake-key-for-ci-testing' }}
run: |
echo "=== DEBUG: Environment Variables ==="
echo "CEREBRAS_API_KEY is set: ${{ secrets.CEREBRAS_API_KEY != '' }}"
echo "CONTEXT7_API_KEY is set: ${{ secrets.CONTEXT7_API_KEY != '' }}"
echo "OPENAI_API_KEY is set: ${{ secrets.OPENAI_API_KEY != '' }}"
echo "ANTHROPIC_API_KEY is set: ${{ secrets.ANTHROPIC_API_KEY != '' }}"
echo "SYN_API_KEY is set: ${{ secrets.SYN_API_KEY != '' }}"
echo "CEREBRAS_API_KEY length: ${#CEREBRAS_API_KEY}"
echo "CONTEXT7_API_KEY length: ${#CONTEXT7_API_KEY}"
echo "OPENAI_API_KEY length: ${#OPENAI_API_KEY}"
echo "ANTHROPIC_API_KEY length: ${#ANTHROPIC_API_KEY}"
echo "SYN_API_KEY length: ${#SYN_API_KEY}"
echo "=== END DEBUG ==="
- name: Run tests
env:
CI: '1'
CODE_PUPPY_TEST_FAST: '1'
CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY || 'fake-key-for-ci-testing' }}
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY || 'fake-key-for-ci-testing' }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY || 'fake-key-for-ci-testing' }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY || 'fake-key-for-ci-testing' }}
SYN_API_KEY: ${{ secrets.SYN_API_KEY || 'fake-key-for-ci-testing' }}
LILAC_API_KEY: ${{ secrets.LILAC_API_KEY || 'fake-key-for-ci-testing' }}
run: |
echo "Running unit tests (skipping integration tests) on ${{ runner.os }} with Python ${{ matrix.python-version }}..."
echo "Required environment variables are set (using CI fallbacks if secrets not available)"
uv run pytest tests/ --ignore tests/integration -v --cov=code_puppy --cov-report=term-missing
# The exec-runner UTF-8 pipe contract is a Windows-only failure mode: child
# Pythons attached to a pipe default their stdio to the legacy codepage
# (cp1252) and crash on emoji, while macOS/Linux children default to UTF-8 --
# so regressions are invisible on the main (macos) test job. The full suite
# has pre-existing, unrelated Windows failures, so this job deliberately
# scopes to the tests that pin the encoding contract instead of gating CI on
# a platform the suite has never run on. Widen it as Windows support grows.
windows-encoding:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
run: pip install uv
- name: Setup uv virtual environment
run: uv venv
- name: Install dependencies
run: uv pip install -e .
- name: Run Windows encoding regression tests
run: uv run pytest tests/test_windows_encoding.py -v --no-cov
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install dev dependencies (ruff)
# Keep in sync with the ruff pin in pyproject.toml. Unpinned ruff let
# 0.16.0 sneak in and change the default rule set (5,901 "new" errors).
run: pip install 'ruff>=0.15,<0.16'
- name: Install code_puppy
run: pip install .
- name: Lint with ruff
run: ruff check .
- name: Check formatting with ruff
run: ruff format --check .