tocket 0.2.1

A implemetation of 'Token Bucket' algorithm
Documentation
name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest

    # Service containers to run with `container-job`
    services:
      # Label used to access the service container
      redis:
        # Docker Hub image
        image: redis
        # Set health checks to wait until redis has started
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          # Maps port 6379 on service container to the host
          - 6379:6379
    steps:
    - uses: actions/checkout@v2

    - name: Build (no features)
      run: cargo check
    - name: Build (feature=redis-impl)
      run: cargo check --features=redis-impl
    - name: Build (feature=distributed-impl)
      run: cargo check --features=distributed-impl
    - name: Build (all features)
      run: cargo check --features=redis-impl,distributed-impl

    - name: Clippy
      run: cargo clippy --tests --features=redis-impl,distributed-impl -- -Dwarnings

    - name: Test (no features)
      run: cargo test
    - name: Test (feature=redis-impl)
      run: cargo test --features=redis-impl
      env:
        REDIS_HOST: redis://localhost:6379
    - name: Test (feature=distributed-impl)
      run: cargo test --features=distributed-impl
    - name: Test (all features)
      run: cargo test --features=redis-impl,distributed-impl
      env:
        REDIS_HOST: redis://localhost:6379