redis-queue-rs 0.1.7

Redis Queue with sync and async support for Rust
Documentation
name: Rust Run Test

on:
  push:

env:
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust_version: [1.79.0]

    services:
      redis:
        image: redis
        ports:
          - 6370:6379

    steps:
    - uses: actions/checkout@v3

    - name: cache-rustup
      uses: actions/cache@v3
      with:
        path: ~/.rustup
        key: toolchain-${{ matrix.rust_version }}

    - uses: actions-rs/toolchain@v1
      if: steps.cache-rustup.outputs.cache-hit != 'true'
      with:
        toolchain: ${{ matrix.rust_version }}
        override: true

    - name: Build
      run: |
        cargo build --verbose

    - name: Run tests
      run: |
        REDIS_PORT=6370 cargo test --verbose -- --test-threads 1

  publish:
    needs: [build-and-test]
    if: startsWith(github.ref, 'refs/tags/v')
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust_version: [1.79.0]

    steps:
    - uses: actions/checkout@v3

    - name: cache-rustup
      uses: actions/cache@v3
      with:
        path: ~/.rustup
        key: toolchain-${{ matrix.rust_version }}

    - uses: actions-rs/toolchain@v1
      if: steps.cache-rustup.outputs.cache-hit != 'true'
      with:
        toolchain: ${{ matrix.rust_version }}
        override: true

    - name: Login to Cargo Registry
      run: |
        cargo login ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose

    - name: Cache Cargo Dependencies
      id: cache-cargo
      uses: actions/cache@v4
      with:
        path: ~/.cargo
        key: ${{ runner.os }}-cargo-edit

    - name: Install Cargo Edit
      if: steps.cache-cargo.outputs.cache-hit != 'true'
      run: |
        cargo install cargo-edit

    - name: Cargo Edit Version
      env:
        RELEASE_TAG: ${{ github.ref }}
      run: |
        cargo set-version ${RELEASE_TAG##*\/v}

    - name: Publish
      run: |
        cargo publish --verbose --allow-dirty