name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Rust
run: rustup update
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Install nightly
run: rustup toolchain install nightly
- name: Install clippy and fmt
run: rustup component add clippy --toolchain nightly && rustup component add rustfmt --toolchain nightly
- name: Run clippy
run: cargo +nightly clippy -- -D warnings
- name: Check formatting
run: cargo +nightly fmt -- --check