name: Rust Build
on:
push:
branches: [ "main" ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Build
run: cargo build
- name: Run lib tests
run: cargo test --lib -- --nocapture
- name: Run integration tests
run: cargo test --test api_test -- --include-ignored --nocapture
- name: Run async integration tests with tokio
run: cargo test --features tokio --test async_api_test -- --include-ignored --nocapture
- name: Run async integration tests with async-io
run: cargo test --features async-io --test async_api_test -- --include-ignored --nocapture
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Run clippy with tokio feature
run: cargo clippy --all-targets --features tokio -- -D warnings
- name: Run clippy with async-io feature
run: cargo clippy --all-targets --features async-io -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check