Introduce CI with Forgejo Actions #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Validation on this repo is local-only: nothing runs
ruff,ty, orpyteston pushes or pull requests, so regressions and lint/type drift can reachmainunnoticed. The agent workflow also relies on CI (ci-watch) after opening PRs, which currently has nothing to poll.Goal
A Forgejo Actions workflow that runs the project's validation suite on pull requests and pushes.
Findings
marvin8/kokopelli(same forge) executes workflows on push/PR/release — observed run history with a realistic mix of success/failure — using the runner labelzhuiri..forgejo/workflows/ci.ymlusesactions/checkout@v4,astral-sh/setup-uv@v5, anduv sync --all-groups(withUV_LINK_MODE=copy) before running checks — the same pattern applies here unchanged.marvin8/wuming@main, DeepSeek-backed) and a gitleaks job (checksum-verifiedcurl | tarinstall — the sanctioned zhuiri pattern).noxfile.py(despite thenoxdependency group) and no.gitleaks.toml— so v1 CI should invoke the tools directly rather than via nox.Plan of attack
.forgejo/workflows/ci.yml: triggerspull_request,push,workflow_dispatch; singlechecksjob onzhuiri.uv sync --all-groups→uv run ruff check→uv run ruff format --check→uv run ty check→uv run pytest.AGENTS.md— ci-watch then becomes meaningful for this repo's PRs.Scope settled with Marvin8
Confirmed decisions:
pr-reviewjob in v1 (needswuming_deepseek_keyrepo secret — Marvin8 to set).nox, following thecangtemplate: a newnoxfile.py(nox-uv sessions; default session listty,ruff,complexipy,pytest), withpytestparameterised over Python 3.12 + 3.13 (yunjin'srequires-pythonis>=3.12,<3.14), plusuv buildto validate packaging.cang's pattern, which pins the version by grepping.pre-commit-config.yaml— so this PR also adds a gitleaks entry to.pre-commit-config.yamlas the single version source (local scanning benefit too).pull_request,push(main only),workflow_dispatch;concurrencycancel-in-progress;timeout-minutes; runnerzhuiri;UV_LINK_MODE=copy.Out of scope (unchanged): release/publish jobs, docs deploy, no
Release-Notes.mdvalidation (no taibai thread yet in this repo).Observation worth noting:
noxtest sessions install into ephemeral venvs, so first CI run downloads the full dependency tree (sentence-transformers → torch). uv's wheel cache on zhuiri should make subsequent runs cheap.Implementation: branch
feat/issue-7-forgejo-actions-ci.Plan of attack (supersedes the original plan above)
noxfile.py— sessionsty,ruff(format --check + check,src/),complexipy(repo root),pytest(PYTHONS["3.12", "3.13"], installingpytest,pytest-asyncio,pytest-cov,freezegun+-e .)..forgejo/workflows/ci.yml— jobspr-review(wuming, max_diff_lines 2000),gitleaks(cang pattern),checks(checkout → setup-uv@v5 →uv sync --all-groups→uv run nox→uv build)..pre-commit-config.yaml(version pinned, same as job greps).AGENTS.md: drop the "No CI" note; tooling table gains the nox line (CI + local parity), prek stays human-only.