add CI workflow on push and PRs #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the Rust toolchain | |
run: | | |
rustup override set nightly | |
rustup update nightly | |
rustup component add rustfmt clippy | |
- name: Check coding style | |
run: cargo fmt --check | |
- name: Run linter | |
run: cargo clippy -- -D warnings | |
- name: Unit tests | |
run: cargo test --verbose |