Skip to content

chore: define lints in Cargo.toml instead of each crate's lib.rs #466

chore: define lints in Cargo.toml instead of each crate's lib.rs

chore: define lints in Cargo.toml instead of each crate's lib.rs #466

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
- name: Run cargo check
run: cargo check --all-targets
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest,just
- name: Download Prophet Stan model
# Download the Prophet Stan model since an example requires it.
run: just download-prophet-stan-model
- name: Run cargo nextest
run: just test-all
- name: Run doc tests
run: just doctest
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: clippy
- name: Run cargo clippy
run: cargo clippy -- -D warnings