From 2994cbbfeab37d46b8470460fa499f09473dcf03 Mon Sep 17 00:00:00 2001 From: Jean Date: Wed, 15 Jul 2026 00:04:44 +0000 Subject: [PATCH] CI: run on a Node image and install Rust on top actions/checkout is a Node action and the rust:* container has no node, so its post-step failed with 'node: not found'. Use node:20-bookworm (node present for checkout) and install Rust via rustup, running build, clippy, and test in one shell. --- .forgejo/workflows/ci.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 1cee689..65aeb1f 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -10,17 +10,19 @@ on: jobs: check: runs-on: ubuntu-latest + # A Node image, because the JS-based actions/checkout needs `node` in the + # container. Rust is installed on top; a rust:* image has no node. container: - image: rust:1-bookworm + image: node:20-bookworm steps: - name: Checkout uses: actions/checkout@v4 - - name: Build - run: cargo build --workspace --locked - - - name: Clippy (warnings are errors) - run: cargo clippy --workspace --locked -- -D warnings - - - name: Test - run: cargo test --workspace --locked + - name: Build, lint, and test + run: | + set -e + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal -c clippy + . "$HOME/.cargo/env" + cargo build --workspace --locked + cargo clippy --workspace --locked -- -D warnings + cargo test --workspace --locked