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:
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue