Skip to content

Ci/redis rs

Ci/redis rs #5

Workflow file for this run

name: Redis-rs CI
on:
push:
branches:
- main
- release-*
- v*
paths:
- glide-core/redis-rs/redis/**
- utils/cluster_manager.py
- deny.toml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/redis-rs.yml
pull_request:
paths:
- glide-core/redis-rs/redis/**
- utils/cluster_manager.py
- deny.toml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/redis-rs.yml
workflow_dispatch:
workflow_call:
concurrency:
group: redis-rs-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
redis-rs-CI:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo
glide-core/redis-rs/redis/src/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache cargo index
uses: actions/cache@v2
with:
path: |
glide-core/redis-rs/redis/src/target
~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v2
with:
path: glide-core/redis-rs/redis/src/target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "ubuntu"
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build project
run: cargo build --release
- name: Test
run: cargo test --release -- --nocapture --test-threads=1
working-directory: ./glide-core/redis-rs/redis/src
- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-redis-rs
path: |
glide-core/redis-rs/redis/src/target/debug/deps/*.d
glide-core/redis-rs/redis/src/target/debug/deps/*.json
- name: Run benchmarks
run: cargo bench
working-directory: ./glide-core/redis-rs/redis
- name: Upload benchmark results
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: benchmark-results-redis-rs
path: |
glide-core/redis-rs/redis/src/target/criterion/**
- name: Test docs
run: cargo test --doc
working-directory: ./glide-core/redis-rs/redis/src
- name: Security audit
run: cargo audit
working-directory: ./glide-core/redis-rs/redis
- name: Run cargo machete
run: |
cargo install cargo-machete
cargo machete
working-directory: ./glide-core/redis-rs/redis
- name: Lint redis-rs
uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./glide-core/redis-rs
github-token: ${{ secrets.GITHUB_TOKEN }}