hem/.forgejo/workflows/ci.yml
Marcel Müller b82764b518
All checks were successful
Cargo Build & Test / hem - Formatting (pull_request) Successful in 27s
Cargo Build & Test / hem - Build & Test (pull_request) Successful in 38s
Add cachekey
Signed-off-by: Marcel Müller <neikos@neikos.email>
2025-06-29 14:19:00 +02:00

43 lines
1 KiB
YAML

name: Cargo Build & Test
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
formatting:
name: hem - Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@1.88
with:
components: rustfmt
- run: cargo fmt --check
build_and_test:
name: hem - Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@1.88
id: toolchain
with:
components: clippy
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ steps.toolchain.outputs.cachekey }}
- run: cargo clippy --all-targets -- -D warnings
- run: cargo build --verbose
- run: cargo test --verbose