👷 Add CI: Rust and frontend checks #4

Merged
mat merged 3 commits from ci-rust-frontend into main 2026-10-02 07:28:39 +00:00
Owner

Context

The MVP is on main but nothing verifies it automatically — make test only runs if someone remembers to. This adds Forgejo Actions CI, matching the runner setup already proven on this instance (ubuntu-latest, Docker execution, per-job container: images).

What it does

Two jobs in .forgejo/workflows/ci.yml, triggered on PRs to main, pushes to main, and manual dispatch (redundant runs on the same PR are cancelled):

  • rust (rust:1, same major version as the Dockerfile): rustup component add rustfmt clippy, cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test
  • frontend (node:22, same as the Dockerfile): npm ci, npm run check (svelte-check + tsc), npm test (vitest), npm run build

E2e (Playwright) follows in a stacked PR — it needs a small config change to run on the CI image's Chromium.

Considerations

  • The rust job clones by hand instead of actions/checkout: JS actions run node inside the job container (confirmed on this runner: exit 127), and the official Rust image has no Node. git ships in rust:1 and the repo is public, so a plain clone of github.head_ref || github.ref_name works for PRs, pushes, and manual dispatch. Caveat: PRs from forks of this repo wouldn't resolve — fine for a solo project.
  • rustup component add rustfmt clippy is needed because current rust: images ship a minimal toolchain.
  • No caching yet; if the Rust job turns out slow we can add cache in a follow-up.
## Context The MVP is on `main` but nothing verifies it automatically — `make test` only runs if someone remembers to. This adds Forgejo Actions CI, matching the runner setup already proven on this instance (`ubuntu-latest`, Docker execution, per-job `container:` images). ## What it does Two jobs in `.forgejo/workflows/ci.yml`, triggered on PRs to main, pushes to main, and manual dispatch (redundant runs on the same PR are cancelled): - **rust** (`rust:1`, same major version as the Dockerfile): `rustup component add rustfmt clippy`, `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test` - **frontend** (`node:22`, same as the Dockerfile): `npm ci`, `npm run check` (svelte-check + tsc), `npm test` (vitest), `npm run build` E2e (Playwright) follows in a stacked PR — it needs a small config change to run on the CI image's Chromium. ## Considerations - **The rust job clones by hand instead of `actions/checkout`**: JS actions run `node` inside the job container (confirmed on this runner: exit 127), and the official Rust image has no Node. `git` ships in `rust:1` and the repo is public, so a plain clone of `github.head_ref || github.ref_name` works for PRs, pushes, and manual dispatch. Caveat: PRs from forks of this repo wouldn't resolve — fine for a solo project. - **`rustup component add rustfmt clippy`** is needed because current `rust:` images ship a minimal toolchain. - No caching yet; if the Rust job turns out slow we can add cache in a follow-up.
👷 Add CI: Rust and frontend checks on Forgejo Actions
Some checks failed
CI / rust (pull_request) Failing after 37s
CI / frontend (pull_request) Successful in 58s
098f7aa281
🐛 Fix rust job: clone without JS action (no Node in rust image)
Some checks failed
CI / rust (pull_request) Failing after 2s
CI / frontend (pull_request) Successful in 27s
4009130682
🐛 Install rustfmt and clippy components in rust job
All checks were successful
CI / rust (pull_request) Successful in 1m40s
CI / frontend (pull_request) Successful in 28s
924e5daddc
mat changed title from WIP: 👷 Add CI: Rust and frontend checks to 👷 Add CI: Rust and frontend checks 2026-10-02 07:28:34 +00:00
mat merged commit 157f708af8 into main 2026-10-02 07:28:39 +00:00
mat deleted branch ci-rust-frontend 2026-10-02 07:28:39 +00:00
mat referenced this pull request from a commit 2026-10-02 07:30:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/canicule!4
No description provided.