Add rust lint CI job. (#9)
All checks were successful
Check / Check Rust (push) Successful in 20s
All checks were successful
Check / Check Rust (push) Successful in 20s
Additionally fix the many lint errors that are occurring. (or disable them). Reviewed-on: #9 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
311755c812
commit
1a48911745
30 changed files with 177 additions and 108 deletions
42
.forgejo/workflows/ci.yml
Normal file
42
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
name: Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
# Should speed up builds.
|
||||
CARGO_INCREMENTAL: 0
|
||||
# Should reduce the size of ./target to improve cache load/store.
|
||||
CARGO_PROFILE_TEST_DEBUG: 0
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Check Rust
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: https://codeberg.org/wackbyte/rust-toolchain@trunk
|
||||
with:
|
||||
toolchain: nightly-2025-10-02
|
||||
components: rustfmt, clippy, rust-src
|
||||
- name: Cache
|
||||
uses: https://github.com/Swatinem/rust-cache@v2
|
||||
with:
|
||||
# Don't cache ~/.cargo/bin since we restore the cache after we install things there
|
||||
cache-bin: "false"
|
||||
workspaces: "backend"
|
||||
- name: "Check Format"
|
||||
run: cargo fmt --check
|
||||
working-directory: rust
|
||||
- name: "Lint"
|
||||
run: |
|
||||
rustup component add clippy
|
||||
cargo clippy --locked -- -D warnings
|
||||
working-directory: rust
|
||||
Loading…
Add table
Add a link
Reference in a new issue