Skip to content

Commit

Permalink
fix: Fixup minor test compile / fmt issues.
Browse files Browse the repository at this point in the history
This commit fixes some minor issues with compiling default-ignored
tests, and also updates the CI config to make sure those cases are
caught in the future.

Signed-off-by: Andrew Lilley Brinker <[email protected]>
  • Loading branch information
alilleybrinker committed May 1, 2024
1 parent e72a576 commit ffefe6d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
run: cargo build --verbose --workspace
- name: Test
run: cargo test --verbose
run: cargo test --verbose --workspace
- name: Lint
run: cargo clippy --verbose
run: cargo clippy --verbose --workspace

2 changes: 1 addition & 1 deletion libs/hc_git/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn get_commits_for_file(repo_path: &Path, file: &str) -> Result<String> {
#[cfg(test)]
mod test {
use super::*;
use hc_command_util::DependentProgram;
use hc_common::command_util::DependentProgram;

#[test]
#[ignore = "can't guarantee availability of Git"]
Expand Down
3 changes: 1 addition & 2 deletions libs/hc_npm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ impl NpmCommand {
#[cfg(test)]
mod test {
use super::*;

use hc_command_util::DependentProgram;
use hc_common::command_util::DependentProgram;

#[test]
#[ignore = "can't guarantee availability of NPM"]
Expand Down
2 changes: 1 addition & 1 deletion libs/hc_session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ pub enum CheckType {
#[cfg(test)]
mod tests {
use super::*;
use hc_common::with_env_vars;
use hc_common::test_util::with_env_vars;
use tempfile::TempDir;

const TEMPDIR_PREFIX: &str = "hc_test";
Expand Down
2 changes: 1 addition & 1 deletion tests/can_run.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use hc_common::{CheckKind, Result};
use hc_common::{error::Result, CheckKind};
use hc_core::*;
use std::ffi::OsString;
use tempfile::tempdir;
Expand Down

0 comments on commit ffefe6d

Please sign in to comment.