Setup CI #1
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: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
# Keep this in sync with `rust-toolchain.toml`. | |
toolchain: nightly-2024-08-21 | |
components: rustc-dev, llvm-tools-preview | |
- name: Run tests | |
run: cargo test --workspace | |
clippy: | |
name: Check with Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
# Keep this in sync with `rust-toolchain.toml`. | |
toolchain: nightly-2024-08-21 | |
components: rustc-dev, llvm-tools-preview | |
- name: Run Clippy | |
run: cargo clippy --workspace -- -D warnings | |
rustfmt: | |
name: Check with rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
# Keep this in sync with `rust-toolchain.toml`. | |
toolchain: nightly-2024-08-21 | |
components: rustc-dev, llvm-tools-preview | |
- name: Run rustfmt | |
run: cargo fmt --all --check |