Merge pull request #12 from dpcthien/feat/vi-locale #71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| python-tests: | |
| name: Python tests (${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install WebUI dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements-webui.txt | |
| - name: Install frontend test dependencies | |
| run: npm ci | |
| - name: Run Python tests | |
| run: python -m unittest discover -s tests -v | |
| webui-build: | |
| name: WebUI typecheck and build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| - name: Check WebUI frontend | |
| run: npm run check:webui | |
| - name: Ensure generated frontend assets are committed | |
| run: git diff --exit-code -- codex_image/webui/static | |
| public-export-guard: | |
| name: Public export guard | |
| if: github.repository == 'kadevin/ilab-conjure' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Check public mirror boundaries | |
| run: | | |
| test ! -e AGENTS.md | |
| test ! -e DESIGN.md | |
| test ! -d docs/superpowers | |
| python - <<'PY' | |
| from pathlib import Path | |
| import re | |
| import sys | |
| root = Path(".") | |
| forbidden_literals = ["/Users" + "/ilab"] | |
| secret_pattern = re.compile(r"\bsk-[A-Za-z0-9_-]{20,}\b") | |
| ignored_dirs = {".git", ".venv", "venv", "node_modules", "__pycache__"} | |
| problems = [] | |
| for path in root.rglob("*"): | |
| if not path.is_file(): | |
| continue | |
| if any(part in ignored_dirs for part in path.parts): | |
| continue | |
| try: | |
| text = path.read_text(encoding="utf-8") | |
| except UnicodeDecodeError: | |
| continue | |
| for literal in forbidden_literals: | |
| if literal in text: | |
| problems.append(f"{path}: contains {literal}") | |
| if secret_pattern.search(text): | |
| problems.append(f"{path}: contains a long sk-* shaped token") | |
| if problems: | |
| print("\n".join(problems), file=sys.stderr) | |
| raise SystemExit(1) | |
| PY |