name: CI
on:
push:
branches:
pull_request:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check
run: cargo check --all --verbose
- name: Build
run: cargo build --all --verbose
- name: Run tests of lib
run: cargo test --lib --verbose