Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/dependabot.yml

This file was deleted.

68 changes: 34 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ env:

jobs:
# Fast checks that run in parallel (no build artifacts needed)
checks:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Initialize git submodules
run: git submodule update --init --recursive

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
${{ env.CARGO_CACHE_PATH }}
${{ env.CARGO_GIT_PATH }}
key: ${{ runner.os }}-cargo-checks-${{ hashFiles('**/Cargo.lock', 'envoy-data-plane-api/build.rs') }}

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
profile: minimal

- name: Check formatting
run: cargo fmt --all -- --check

- name: Run clippy (fail on warnings)
run: cargo clippy --all-targets --all-features
#checks:
#name: fmt + clippy
#runs-on: ubuntu-latest
#steps:
# - uses: actions/checkout@v4
#
# - name: Initialize git submodules
# run: git submodule update --init --recursive
#
# - name: Cache cargo
# uses: actions/cache@v4
# with:
# path: |
# ${{ env.CARGO_CACHE_PATH }}
# ${{ env.CARGO_GIT_PATH }}
# key: ${{ runner.os }}-cargo-checks-${{ hashFiles('**/Cargo.lock', 'envoy-data-plane-api/build.rs') }}
#
# - name: Install protoc
# run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
#
# - name: Setup Rust
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# components: rustfmt, clippy
# profile: minimal
#
# - name: Check formatting
# run: cargo fmt --all -- --check
#
# - name: Run clippy (fail on warnings)
# run: cargo clippy --all-targets --all-features

# Build and test that share artifacts
build-and-test:
Expand Down Expand Up @@ -74,8 +74,8 @@ jobs:
toolchain: stable
profile: minimal

- name: Build (release)
run: cargo build --workspace --release --locked
#- name: Build (release)
# run: cargo build --workspace --release --locked

- name: Run tests
run: cargo test --workspace --release --locked
10 changes: 6 additions & 4 deletions orion-lib/src/clusters/cluster/original_dst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ mod lrumap {
}

// TODO: understand why tests are failing in CI (github)
#[cfg(any())]
#[cfg(test)]
mod lrumap_tests {
use std::{
collections::HashMap,
Expand Down Expand Up @@ -595,14 +595,16 @@ mod lrumap {

let mut values_iter = self.map.into_iter();
let mut expected_iter = keys.iter();
let mut i = 0;
loop {
match (values_iter.next(), expected_iter.next()) {
(Some(value), Some(expected)) => {
assert_eq!(value, expected, "expected same map order: {}", error_message)
pair@(Some(value), Some(expected)) => {
assert_eq!(value, expected, "expected same map order: {} (index:{i}, map_len:{}, keys:{}, {pair:?})", error_message, self.map.len(), keys.len())
},
(None, None) => break,
_ => panic!("expected same map values: {}", error_message),
pair => panic!("expected same map values: {} (index:{i}, map_len:{}, keys:{}, {pair:?})", error_message, self.map.len(), keys.len()),
}
i += 1;
}
}
}
Expand Down
Loading