Skip to content

Add tests

Add tests #18

Workflow file for this run

name: Check
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install nightly Rust toolchain
run: |
rustup toolchain install nightly --profile minimal
rustup component add clippy rustfmt --toolchain nightly
rustup default nightly
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --all
- name: Format
run: cargo fmt --all --check
- name: Build
run: cargo build --all --verbose
- name: Docs
run: cargo doc --all --verbose
- name: Lint
run: cargo clippy --all -- -D warnings
- name: Tests
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install docker docker-compose
fi
docker compose up -d --wait
cargo test --all --verbose
docker compose down