All checks were successful
Rust / check (pull_request) Successful in 5m14s
The Gitea runner image doesn't include Rust, so every job failed at 'cargo: command not found'. Install the stable toolchain, cache the build, and run cargo fmt --check and clippy alongside the tests.
29 lines
564 B
YAML
29 lines
564 B
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
# The Gitea runner image doesn't ship with Rust, unlike GitHub's.
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Format
|
|
run: cargo fmt --check
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
- name: Test
|
|
run: cargo test
|