Skip to content

Commit

Permalink
Add fmt & clippy check in Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Mar 9, 2024
1 parent a267c01 commit 15242ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/rust-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ env:
CARGO_TERM_COLOR: always

jobs:
cargo-test:
check:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: Check format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libseccomp-dev protobuf-compiler gcc-11 g++-11
- name: Setup gcc/g++ 11
Expand Down
4 changes: 2 additions & 2 deletions judge-core/tests/judge_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn test_run_judge() {
assert_eq!(result.verdict, JudgeVerdict::Accepted);
} else {
log::debug!("{:?}", result);
assert!(false)
unreachable!()
}
}

Expand Down Expand Up @@ -146,7 +146,7 @@ fn test_run_interact() {
}
Err(e) => {
log::error!("meet error: {:?}", e);
assert!(false);
unreachable!()
}
}
}
Expand Down

0 comments on commit 15242ba

Please sign in to comment.