name: Test Changes
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Get Rust
id: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy, rustfmt
override: true
- uses: Swatinem/rust-cache@v2
- name: Check out code
uses: actions/checkout@v6
- name: Run fmt check
uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: --check --all
- name: Run clippy
uses: actions-rs/cargo@v1.0.3
with:
command: clippy
args: --all-targets --all-features
- name: Run tests
uses: actions-rs/cargo@v1.0.3
with:
command: test
args: --all-features