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
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Lint
run: cargo clippy --workspace --all-features
- name: Code formatting
run: cargo fmt --check
- name: Run tests
run: cargo test --verbose --workspace --all-features
env:
REDIS_URL: localhost:6379