name: CI
on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy,rustfmt
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features --
- name: Rustfmt
run: cargo fmt --all -- --check