name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --all-features --no-deps
- name: Build all features
run: cargo build --all-features --verbose
- name: Run all tests
run: cargo test --all-features --verbose -- --include-ignored