Skip to content

perf: --single-branch upstream clone (follow-up to #19 review) #9

perf: --single-branch upstream clone (follow-up to #19 review)

perf: --single-branch upstream clone (follow-up to #19 review) #9

Workflow file for this run

name: CI
# This repo had no CI. Without it the port verifier's pytest/ruff/mypy calls only
# ever ran inside the sync job, so a generated PR reached review with no
# independent signal. This runs the same checks on every PR and push.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uv sync --all-extras
- name: Lint
run: uv run ruff check .
- name: Format
run: uv run ruff format --check .
- name: Type check
run: uv run mypy src
# Deterministic tests only. tests/e2e needs OPENROUTER_API_KEY and skips
# cleanly without it.
- name: Tests
run: uv run pytest tests/unit -q
# Reports the port's own mechanical gate. Advisory here, BLOCKING inside the
# sync job (scripts/upstream) where it gates whether state.yaml advances.
#
# Advisory on purpose: the port is currently a minor version behind upstream, so
# the required-API check fails by design until the first sync lands. Making that
# a red required check on every unrelated PR just teaches people to ignore CI.
# The signal still shows up in the job summary.
verify-port:
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/port-toolchain
- name: Port verifier (advisory)
id: verify
continue-on-error: true
run: |
set -o pipefail
./.upstreamer/scripts/verify.sh 2>&1 | tee /tmp/verify.log
- name: Summarize
if: always()
run: |
{
echo "## Port verifier"
echo
if [ "${{ steps.verify.outcome }}" = "success" ]; then
echo "Port is in sync with its parity floor."
else
echo "Parity gaps below. Expected until the port catches up to upstream —"
echo "advisory here, blocking inside the sync job."
fi
echo
echo '```'
cat /tmp/verify.log 2>/dev/null || echo "(no output)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"