mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-24 21:23:08 +00:00
bug: fix -V not working and causing Cirrus CI to fail (#1478)
* bug: fix -V not working and causing Cirrus CI to fail * add comment * update workflows and fix tests
This commit is contained in:
parent
ee2e1fee1c
commit
7aa379aabf
3 changed files with 17 additions and 3 deletions
4
.github/workflows/coverage.yml
vendored
4
.github/workflows/coverage.yml
vendored
|
@ -64,7 +64,7 @@ jobs:
|
|||
- name: Install cargo-llvm-cov
|
||||
run: |
|
||||
rustup component add llvm-tools-preview
|
||||
cargo install cargo-llvm-cov --version 0.5.37 --locked
|
||||
cargo install cargo-llvm-cov --version 0.6.10 --locked
|
||||
|
||||
- name: Generate code coverage
|
||||
run: |
|
||||
|
@ -72,7 +72,7 @@ jobs:
|
|||
|
||||
# The token is generally not needed, but sometimes the default shared token hits limits.
|
||||
- name: Upload to codecov.io
|
||||
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
|
||||
uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0
|
||||
with:
|
||||
action: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # 3.1.4
|
||||
with: |
|
||||
|
|
|
@ -564,7 +564,7 @@ pub struct OtherArgs {
|
|||
#[arg(short = 'h', long, action = ArgAction::Help, help = "Prints help info (for more details use `--help`.")]
|
||||
help: (),
|
||||
|
||||
#[arg(short = 'v', long, action = ArgAction::Version, help = "Prints version information.")]
|
||||
#[arg(short = 'V', long, action = ArgAction::Version, help = "Prints version information.")]
|
||||
version: (),
|
||||
}
|
||||
|
||||
|
|
|
@ -161,3 +161,17 @@ fn test_gpu_flag() {
|
|||
"unexpected argument '--enable_gpu' found",
|
||||
));
|
||||
}
|
||||
|
||||
/// Sanity test due to <https://github.com/ClementTsang/bottom/pull/1478>.
|
||||
#[test]
|
||||
fn test_version() {
|
||||
btm_command(&["--version"]).assert().success();
|
||||
btm_command(&["-V"]).assert().success();
|
||||
}
|
||||
|
||||
/// Sanity test due to <https://github.com/ClementTsang/bottom/pull/1478>.
|
||||
#[test]
|
||||
fn test_help() {
|
||||
btm_command(&["--help"]).assert().success();
|
||||
btm_command(&["-h"]).assert().success();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue