Publish backend takeover changes (#146) #489
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Check for unresolved merge markers | |
| run: | | |
| if git grep -n -E '^(<<<<<<< |>>>>>>> )' -- .; then | |
| echo "Unresolved merge markers detected. Resolve conflicts before merge." >&2 | |
| exit 1 | |
| fi | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11.9" | |
| - name: Validate env contract | |
| run: | | |
| python scripts/check_env_example.py \ | |
| --file .env.example \ | |
| --required TRR_INTERNAL_ADMIN_SHARED_SECRET \ | |
| --allow-hyphen GEMINI-MODEL | |
| - name: Check repo hygiene | |
| run: python scripts/check_repo_hygiene.py | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "0.9.27" | |
| - name: Verify requirements lock freshness | |
| run: | | |
| cp requirements.lock.txt /tmp/requirements.lock.before.txt | |
| uv pip compile requirements.in --python-version 3.11 -o requirements.lock.txt | |
| diff -u /tmp/requirements.lock.before.txt requirements.lock.txt | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Import gate | |
| run: python -c "import api.main" | |
| - name: Run API tests | |
| run: python -m pytest tests/api -q | |
| test-py312-canary: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Validate env contract | |
| run: | | |
| python scripts/check_env_example.py \ | |
| --file .env.example \ | |
| --required TRR_INTERNAL_ADMIN_SHARED_SECRET \ | |
| --allow-hyphen GEMINI-MODEL | |
| - name: Check repo hygiene | |
| run: python scripts/check_repo_hygiene.py | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Import gate | |
| run: python -c "import api.main" | |
| - name: Run API smoke subset | |
| run: python -m pytest tests/api -q |