name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --all-targets --all-features
- name: Test
run: cargo test --all-features
- name: Run example assertions
run: |
cargo run --example soft_dtw_ranking
cargo run --example soft_rank
cargo run --example ltr_significance --features eval
cargo run --example train_with_schedule
- name: Semver check
if: github.event_name == 'pull_request'
run: |
cargo install cargo-semver-checks --locked || true
cargo semver-checks