Skip to content

Commit

Permalink
ci: 🎡 cargo test
Browse files Browse the repository at this point in the history
  • Loading branch information
wjian23 committed Jan 22, 2024
1 parent 5c2680e commit 9212f27
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@ jobs:
run: cargo clippy --all-targets --all-features -- -D warnings
- name: cargo check
run: cargo check
tests:
name: rust tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-10-15
- uses: Swatinem/rust-cache@v2
- name: cargo test
run: cargo test --all --all-features
2 changes: 1 addition & 1 deletion core/src/db/tests/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ fn update_msg_test() {
.expect("Failed to query msgs")
});
assert_eq!(msgs.len(), 1);
assert_eq!(msgs[0].cur_idx(), 1);
assert_eq!(msgs[0].cur_idx(), 0);
assert_eq!(msgs[0].cont_count(), 2);
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/model/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ mod test {
let mut msg = Msg::new_user_text("", MsgMeta::default());
assert_eq!(msg.cur_idx(), 0);
msg.add_cont(MsgCont::init_text());
assert_eq!(msg.cur_idx(), 1);
assert_eq!(msg.cur_idx(), 0);
assert_eq!(msg.cont_count(), 2);

msg.switch_cont(0);
Expand Down

0 comments on commit 9212f27

Please sign in to comment.