CI: run on a Node image and install Rust on top
Some checks failed
CI / check (push) Failing after 1m30s
Some checks failed
CI / check (push) Failing after 1m30s
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.
This commit is contained in:
parent
0ed6684522
commit
2994cbbfea
1 changed files with 11 additions and 9 deletions
|
|
@ -10,17 +10,19 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
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:
|
container:
|
||||||
image: rust:1-bookworm
|
image: node:20-bookworm
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build
|
- name: Build, lint, and test
|
||||||
run: cargo build --workspace --locked
|
run: |
|
||||||
|
set -e
|
||||||
- name: Clippy (warnings are errors)
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal -c clippy
|
||||||
run: cargo clippy --workspace --locked -- -D warnings
|
. "$HOME/.cargo/env"
|
||||||
|
cargo build --workspace --locked
|
||||||
- name: Test
|
cargo clippy --workspace --locked -- -D warnings
|
||||||
run: cargo test --workspace --locked
|
cargo test --workspace --locked
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue