Skip to content

Commit

Permalink
chore: Fix errors/warnings in CI summary (#258)
Browse files Browse the repository at this point in the history
* Disable cache

* Fix

* Fix warining

* Use default rustflags
  • Loading branch information
nahsi authored Jul 11, 2023
1 parent 14d6314 commit 0b603e7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:

- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Setup marine
uses: fluencelabs/setup-marine@v1
Expand All @@ -56,8 +58,6 @@ jobs:
run: cargo fmt --all -- --check

- name: Run cargo clippy
env:
RUSTFLAGS: ""
run: cargo clippy -Z unstable-options --all -- -D warnings

- name: Install cargo-nextest
Expand All @@ -67,7 +67,6 @@ jobs:

- name: Run cargo nextest
env:
RUSTFLAGS: ""
NEXTEST_RETRIES: 2
NEXTEST_TEST_THREADS: 1
run: cargo nextest run --release --all-features --no-fail-fast
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Download marine artifact
id: marine
Expand Down
10 changes: 3 additions & 7 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[toolchain]
channel = "nightly-2022-12-01"
components = ["rustfmt", "clippy"]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"wasm32-wasi"
]
channel = "nightly-2023-02-27"
components = [ "rustfmt", "clippy" ]
targets = [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "wasm32-wasi" ]
profile = "minimal"
5 changes: 0 additions & 5 deletions service/rust-toolchain.toml

This file was deleted.

8 changes: 4 additions & 4 deletions service/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ mod tests {
) -> EvictStaleResult {
let cp = CPWrapper::new("peer_id", "host_id").add_timestamp_tetraplets(0);
let evict_result = registry.evict_stale_cp(current_timestamp_sec, cp.get());
assert!(evict_result.success, evict_result.error);
assert!(evict_result.success, "{}", evict_result.error);
evict_result
}

Expand Down Expand Up @@ -387,7 +387,7 @@ mod tests {
solution,
weight,
);
assert!(result.success, result.error);
assert!(result.success, "{}", result.error);
}

fn get_records(
Expand Down Expand Up @@ -474,7 +474,7 @@ mod tests {
timestamp_issued,
solution,
);
assert!(result.success, result.error);
assert!(result.success, "{}", result.error);
}

#[test]
Expand Down Expand Up @@ -846,7 +846,7 @@ mod tests {
let expired_timestamp = timestamp_created + DEFAULT_EXPIRED_AGE;
let cp = CPWrapper::new("peer_id", "host_id").add_timestamp_tetraplets(0);
let result = registry.clear_expired_cp(expired_timestamp, cp.get());
assert!(result.success, result.error);
assert!(result.success, "{}", result.error);
assert_eq!(result.count_keys, 1);
}

Expand Down

0 comments on commit 0b603e7

Please sign in to comment.