name: CI
on:
push:
branches:
pull_request:
workflow_call:
jobs:
lint_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint code
run: cargo clippy --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features --tests