Files
ChrisTitusTech_linutil/.github/workflows/rust.yml
T
Adam Perkowski 2aa99ce653 test: implement unit tests for linutil_core (#1140)
🚨 THIS IS MY COMEBACK PR I CAME BACK HELLO 🚨

so basically i added unit tests for critical core functions and also
some cats :3 hope its not an issue (im taking a break again if it is)
also figured would be nice to have `cargo test` in `publish.sh`

resolves #1023
2025-10-07 13:03:43 -05:00

51 lines
1.1 KiB
YAML

name: Rust Checks
permissions:
contents: read
on:
pull_request:
branches: ["main"]
paths:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-index-
- name: Run cargo test
run: cargo test --no-fail-fast --package linutil_core
- name: Run cargo clippy
run: cargo clippy -- -Dwarnings
- name: Run cargo fmt
run: cargo fmt --all --check