Skip to content

Commit

Permalink
Update settings.json
Browse files Browse the repository at this point in the history
Signed-off-by: avifenesh <aviarchi1994@gmail.com>
  • Loading branch information
avifenesh committed Oct 22, 2024
1 parent 9e7102a commit 02af6a6
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 126 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,6 @@ jobs:
run: sudo chown -R $USER:$USER /home/ubuntu/actions-runner/_work/valkey-glide

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build Python wrapper
uses: ./.github/workflows/build-python-wrapper
Expand Down
234 changes: 120 additions & 114 deletions .github/workflows/redis-rs.yml
Original file line number Diff line number Diff line change
@@ -1,123 +1,129 @@
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:
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
group: redis-rs-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
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 }}
redis-rs-CI:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Cache cargo
if: always()
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./glide-core/redis-rs/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "ubuntu"
target: "x86_64-unknown-linux-gnu"
engine-version: "7.2.5"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build project
run: cargo build --release
working-directory: ./glide-core/redis-rs/redis/src

- name: Lint redis-rs
shell: bash
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
cargo install --locked cargo-deny
cargo deny check --exclude-dev --format human --config ${GITHUB_WORKSPACE}/deny.toml
working-directory: ./glide-core/redis-rs/redis

- name: Test
run: |
cargo test --release -- --test-threads=1 | tee ../test-results.xml
echo "### Tests passed :v:" >> $GITHUB_STEP_SUMMARY
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/test-results.xml

- name: Run benchmarks
run: |
cargo bench | tee bench-results.xml
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/bench-results.xml

- name: Test docs
run: |
cargo test --doc
working-directory: ./glide-core/redis-rs/redis/src

- name: Security audit
run: |
cargo audit | tee audit-results.txt
if grep -q "Crate: " audit-results.txt; then
echo "## Security audit results summary: Security vulnerabilities found :exclamation: :exclamation:" >> $GITHUB_STEP_SUMMARY
echo "Security audit results summary: Security vulnerabilities found"
else
echo "### Security audit results summary: All good, no security vulnerabilities found :closed_lock_with_key:" >> $GITHUB_STEP_SUMMARY
echo "Security audit results summary: All good, no security vulnerabilities found"
fi
working-directory: ./glide-core/redis-rs/redis

- name: Run cargo machete
run: |
cargo install cargo-machete
cargo machete | tee machete-results.txt
if grep -A1 "cargo-machete found the following unused dependencies in this directory:" machete-results.txt | sed -n '2p' | grep -v "^if" > /dev/null; then
echo "Machete results summary: Unused dependencies found" >> $GITHUB_STEP_SUMMARY
echo "Machete results summary: Unused dependencies found"
cat machete-results.txt | grep -A1 "cargo-machete found the following unused dependencies in this directory:" | sed -n '2p' | grep -v "^if" >> $GITHUB_STEP_SUMMARY
else
echo "### Machete results summary: All good, no unused dependencies found :rocket:" >> $GITHUB_STEP_SUMMARY
echo "Machete results summary: All good, no unused dependencies found"
fi
working-directory: ./glide-core/redis-rs/redis
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
"black"
],
"rust-analyzer.cargo.features": "all",
"dotnet.defaultSolution": "csharp/csharp.sln",
"dotnet.defaultSolution": "csharp/csharp.sln"
}
14 changes: 7 additions & 7 deletions glide-core/redis-rs/redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ strum_macros = "0.26"
percent-encoding = "2.1"

# We need this for redis url parsing
url = "= 2.5.0"
url = "= 2.5.2"

# We need this for script support
sha1_smol = { version = "1.0", optional = true }
Expand Down Expand Up @@ -78,10 +78,10 @@ native-tls = { version = "0.2", optional = true }
tokio-native-tls = { version = "0.3", optional = true }

# Only needed for rustls
rustls = { version = "0.22", optional = true }
rustls = { version = "0.23", optional = true, features = ["ring"] }
webpki-roots = { version = "0.26", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
tokio-rustls = { version = "0.25", optional = true }
rustls-native-certs = { version = "0.8", optional = true }
tokio-rustls = { version = "0.26", optional = true }
rustls-pemfile = { version = "2", optional = true }
rustls-pki-types = { version = "1", optional = true }

Expand Down Expand Up @@ -168,7 +168,7 @@ assert_approx_eq = "1.0"
fnv = "1.0.5"
futures = "0.3"
futures-time = "3"
criterion = "0.4"
criterion = "0.5"
partial-io = { version = "0.5", features = ["tokio", "quickcheck1"] }
quickcheck = "1.0.3"
tokio = { version = "1", features = [
Expand All @@ -177,11 +177,11 @@ tokio = { version = "1", features = [
"rt-multi-thread",
"time",
] }
tempfile = "=3.6.0"
tempfile = "3.13"
once_cell = "1"
anyhow = "1"
sscanf = "0.4.1"
serial_test = "2"
serial_test = "3"

[[test]]
name = "test_async"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use pin_project_lite::pin_project;
use std::collections::VecDeque;
use std::fmt;
use std::fmt::Debug;
use std::io;
use std::pin::Pin;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ pub(crate) fn create_rustls_config(
not(feature = "tls-native-tls"),
not(feature = "tls-rustls-webpki-roots")
))]
for cert in load_native_certs()? {
for cert in load_native_certs().certs {
root_store.add(cert)?;
}

Expand Down

0 comments on commit 02af6a6

Please sign in to comment.