Mirrors the existing GitLab CI: one test job (pytest + ruff) gated by a tag job that creates v<run_number> on master. Supervisor polls for new tags to deploy — no SSH keys or deploy credentials in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
1017 B
YAML
37 lines
1017 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: https://github.com/astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- run: uv sync
|
|
- run: uv run pytest web/tests/ -x -q -p no:faulthandler
|
|
- run: uv run ruff check web/src/ web/tests/
|
|
|
|
# Creates v<N> tag after tests pass. The on-server supervisor polls for new
|
|
# tags every 60s and deploys automatically. No SSH keys or deploy credentials
|
|
# needed in CI — only the built-in github.token.
|
|
tag:
|
|
needs: [test]
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ github.token }}
|
|
- name: Create and push tag
|
|
run: |
|
|
git config user.name "CI"
|
|
git config user.email "ci@noreply"
|
|
git tag "v${{ github.run_number }}"
|
|
git push origin "v${{ github.run_number }}"
|