ci: move CI and release to GitHub Actions - #1
Merged
Conversation
Apply the fixes the new CI gate demands: `cargo clippy --fix` for the 27 mechanical lints (redundant closures, needless borrows, `Iterator::last` on a DoubleEndedIterator, `io::Error::other`) plus `cargo fmt`. `persona::review` keeps its 9 arguments — each maps 1:1 to a CLI flag — so the too_many_arguments lint is allowed there with a note. All changes are semantics-preserving; 142 tests still pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub had no workflows at all: the Actions tab was red from a May run whose `actions/upload-artifact@v3` steps can no longer succeed, and no test or lint gate existed on any forge — the last 11 commits landed unverified. - Add ci.yml: fmt, clippy -D warnings, tests, manifest version consistency, and a build + `--version`/`--help` smoke test on linux-musl and darwin-arm64. - Add release.yml, ported from the Gitea workflow: artifact v3 -> v4, GitHub-hosted runners (macos-latest is arm64, both musl targets via cargo-zigbuild), and `gh release` in place of ~100 lines of hand-rolled HTTP upload calls. Missing NPM_TOKEN now fails loudly instead of publishing nothing, ~/.npmrc is written under umask 077, and a concurrency group keeps one tag from releasing twice. - Extract the inlined awk version validation into scripts/check-versions.sh, shared by both forges. - Demote .gitea/workflows/release.yml to a manual fallback. The mirror receives tags too, so leaving its push trigger on would race GitHub publishing the same version. - Add `make lint`, `make check-versions`, and `make ci` so the same gates run locally. Verified with actionlint (shellcheck included) and `make ci`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The first CI run failed clippy on a tree that was green locally: the runner resolved `stable` to 1.98.0 while this machine had 1.94.0, and 1.98 stabilized `unnecessary_sort_by`, which fires on the descending sort in `run::score_skills`. Fix the lint, then remove the drift that hid it — rust-toolchain.toml pins 1.98.0 with rustfmt and clippy, so `make ci` and the CI gate lint with the same compiler. Bumping it is now a deliberate commit that has to pass `make ci` first. Workflows install the pinned toolchain via `rustup show` and add cross targets to it; the Gitea fallback installs rustup with `--default-toolchain none` so its build cannot silently use a floating stable the pin would override. Cache keys include the toolchain file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Actions tab is red and there is no test gate anywhere.
actions/upload-artifact@v3steps can no longer succeed since v3 was shut down, so re-running it would fail again regardless.cargo fmt --checkfails andclippy -D warningsreports 28 violations.What changed
Quality gate green —
cargo clippy --fixhandled 27 mechanical lints (redundant closures, needless borrows,Iterator::laston aDoubleEndedIterator,io::Error::other), pluscargo fmt.persona::reviewkeeps its 9 arguments, each mapping 1:1 to a CLI flag, with the lint allowed and a note. All semantics-preserving; 142 tests pass..github/workflows/ci.yml(push to main, every PR) — fmt, clippy-D warnings, tests, manifest version consistency, and a build +--version/--helpsmoke test on linux-musl and darwin-arm64..github/workflows/release.yml— the Gitea workflow ported to GitHub-hosted runners, with the breakage fixed along the way:upload/download-artifact@v3(dead)macos-arm64macos-latest(arm64 native)cargo-zigbuild, both musl targetsjqgh releasewith the built-in tokenNPM_TOKEN~/.npmrcumask 077concurrencygroupAlso added: verification that all three tarballs actually landed on the release.
scripts/check-versions.sh— the inlined awk version validation (~55 lines, duplicated per forge) extracted into one script both forges call..gitea/workflows/release.ymldemoted to a manual fallback — its push trigger is removed. The mirror receives tags too, so leaving it on would have two forges publishing the same version concurrently.make lint/make check-versions/make ci— the same gates, runnable locally.Verification
actionlint(with shellcheck) clean on all three workflowsshellcheck scripts/check-versions.shcleanmake cipasses: fmt, clippy-D warnings, 142 tests, version consistencyNPM_TOKENis already configured on this repo; no secret setup neededrelease.ymlcannot be exercised until av*tag is pushed. It supportsworkflow_dispatchwithdry_run=truefor a build-only rehearsal first.🤖 Generated with Claude Code