Skip to content

ci: update workflows #8

ci: update workflows

ci: update workflows #8

Workflow file for this run

on:
pull_request:
push:
branches:
- master
name: CI
jobs:
build_and_test:
name: cargo build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.94.0
id: toolchain
with:
components: clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- run: cargo clippy --tests --no-deps -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.94.0
id: toolchain
with:
components: rustfmt
- run: cargo fmt --check
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.94.0
id: toolchain
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- run: cargo build --release