CI / checks (push) Skipped
CI / checks (pull_request) Successful in 5m17s
Every live test that touches a repository gets one of its own from e2e_support.fresh_repo, made by the test operator as an operator makes a project's (D4, D8): seeded from tests/integration/seed/ (the sandbox's package, without past runs' leftovers), the agent's account a collaborator with write access, main protected (pushes only by the owner, an approval to merge), and a deploy key generated for the run. It is deleted afterwards (NISSE_E2E_KEEP_REPOS keeps it); scripts/e2e-cleanup.sh deletes leftovers. - Both e2e fixtures use it; per-run base branches are gone. The merge helper approves first, as the protection now requires. - test_gitea_live uses it, so CI needs NISSE_OPERATOR_TOKEN and no longer writes the sandbox deploy key (NISSE_PUSH_KEY). - A live test of the helper: seeded, shared with the agent, protected against it, deleted. - nisse-test.yaml's project entry is a placeholder; pytest and ruff skip the seed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
name: CI
|
|
on:
|
|
# Only main on push. A PR branch is already covered by the pull_request
|
|
# event, and running both fired two identical suites concurrently — which
|
|
# doubled the LLM tokens the live tests spend and tripped the proxy's
|
|
# per-minute limit.
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
# Manual re-run, e.g. after rotating a credential or raising a budget cap.
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Sync workspace
|
|
run: uv sync --all-packages
|
|
|
|
- name: Install sshd
|
|
# The tests reach "the build VM" over real SSH, through a throwaway
|
|
# sshd the test fixture starts (nisse_dev/testing.py).
|
|
run: |
|
|
SUDO=$(command -v sudo || true)
|
|
$SUDO apt-get update -qq
|
|
$SUDO apt-get install -y -qq openssh-server openssh-client > /dev/null
|
|
$SUDO mkdir -p /run/sshd
|
|
|
|
- name: Lint
|
|
run: uv run ruff check .
|
|
|
|
- name: Format check
|
|
run: uv run ruff format --check .
|
|
|
|
- name: Unit tests
|
|
run: uv run pytest -m "not integration and not e2e"
|
|
|
|
- name: Integration tests
|
|
# Everything but the secrets is in tests/integration/nisse-test.yaml,
|
|
# which refers to these by name. A missing secret fails the live
|
|
# tests that need it; it is never quietly turned into a skip.
|
|
env:
|
|
NISSE_LLM_TOKEN: ${{ secrets.NISSE_LLM_TOKEN }}
|
|
NISSE_MATRIX_TOKEN: ${{ secrets.NISSE_MATRIX_TOKEN }}
|
|
NISSE_GITEA_TOKEN: ${{ secrets.NISSE_GITEA_TOKEN }}
|
|
# The test operator, who makes each run's repository (and its deploy
|
|
# key) and deletes it afterwards.
|
|
NISSE_OPERATOR_TOKEN: ${{ secrets.NISSE_OPERATOR_TOKEN }}
|
|
run: uv run pytest -m "integration and not e2e" -rs
|