Skip to content

Setup CI

Setup CI #1

Workflow file for this run

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