Merge pull request #528 from Nukesor/update-codecov-action

chore: Update codecov github action
This commit is contained in:
Arne Christian Beer 2024-05-09 02:02:22 +02:00 committed by GitHub
commit 63aba5455c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 8 deletions

View file

@ -67,7 +67,8 @@ jobs:
run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

View file

@ -122,7 +122,7 @@ fn print_all_groups(
let sorted_tasks = sort_tasks_by_group(tasks);
// Always print the default queue at the very top, if no specific group is requested.
if sorted_tasks.get(PUEUE_DEFAULT_GROUP).is_some() {
if sorted_tasks.contains_key(PUEUE_DEFAULT_GROUP) {
let tasks = sorted_tasks.get(PUEUE_DEFAULT_GROUP).unwrap();
let headline = get_group_headline(
PUEUE_DEFAULT_GROUP,

View file

@ -1,3 +1,6 @@
// Clippy generates a false-positive for an empty generated docstring in the query parser code.
#![allow(clippy::empty_docs)]
use anyhow::{bail, Context, Result};
use pest::Parser;
use pest_derive::Parser;
@ -12,6 +15,8 @@ mod order_by;
use limit::Limit;
use order_by::Direction;
/// See the pest docs on how this derive macro works and how to use pest:
/// https://docs.rs/pest/latest/pest/
#[derive(Parser)]
#[grammar = "./src/client/query/syntax.pest"]
struct QueryParser;

View file

@ -162,7 +162,7 @@ mod tests {
// Assert that only the first entry has been deleted (TaskResult::Success)
let state = state.lock().unwrap();
assert_eq!(state.tasks.len(), 5);
assert!(state.tasks.get(&0).is_none());
assert!(!state.tasks.contains_key(&0));
}
#[test]
@ -208,6 +208,6 @@ mod tests {
// Assert that only the first entry has been deleted from the 'other' group (TaskResult::Success)
let state = state.lock().unwrap();
assert_eq!(state.tasks.len(), 11);
assert!(state.tasks.get(&6).is_none());
assert!(!state.tasks.contains_key(&6));
}
}

View file

@ -1,2 +1,6 @@
// This lint is generating way too many false-positives.
// Ignore it for now.
#![allow(clippy::assigning_clones)]
pub mod client;
pub mod daemon;

View file

@ -33,7 +33,7 @@ fn test_restore_from_old_state() -> Result<()> {
// Make sure the groups are loaded.
assert!(
state.groups.get(PUEUE_DEFAULT_GROUP).is_some(),
state.groups.contains_key(PUEUE_DEFAULT_GROUP),
"Group 'default' should exist."
);
assert_eq!(
@ -41,7 +41,7 @@ fn test_restore_from_old_state() -> Result<()> {
GroupStatus::Running
);
assert!(
state.groups.get("test").is_some(),
state.groups.contains_key("test"),
"Group 'test' should exist"
);
assert_eq!(
@ -49,7 +49,7 @@ fn test_restore_from_old_state() -> Result<()> {
GroupStatus::Paused
);
assert!(state.tasks.get(&3).is_some(), "Task 3 should exist");
assert!(state.tasks.contains_key(&3), "Task 3 should exist");
assert_eq!(state.tasks.get(&3).unwrap().command, "ls stash_it");
Ok(())