name: Test
on:
pull_request:
branches:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.66.1
components: clippy, rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo build
run: cargo build
- name: Run cargo clippy
run: cargo clippy -- -D warnings
- name: Run cargo test
run: cargo test