mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Skip clean-up of test temporary directories in CI
This commit is contained in:
parent
2803e6fc5f
commit
9d9dd0f22f
1 changed files with 12 additions and 2 deletions
|
@ -102,7 +102,7 @@ pub struct TestContext {
|
|||
extra_env: Vec<(OsString, OsString)>,
|
||||
|
||||
#[allow(dead_code)]
|
||||
_root: tempfile::TempDir,
|
||||
_root: Option<tempfile::TempDir>,
|
||||
}
|
||||
|
||||
impl TestContext {
|
||||
|
@ -594,8 +594,18 @@ impl TestContext {
|
|||
"https://raw.githubusercontent.com/astral-sh/packse/PACKSE_VERSION/".to_string(),
|
||||
));
|
||||
|
||||
// When running in CI, we leave the temporary directories around because they can be
|
||||
// expensive to delete and the machine is disposable.
|
||||
let root_path = ChildPath::new(root.path());
|
||||
let root = if env::var_os(EnvVars::CI).is_some() {
|
||||
let _ = root.into_path();
|
||||
None
|
||||
} else {
|
||||
Some(root)
|
||||
};
|
||||
|
||||
Self {
|
||||
root: ChildPath::new(root.path()),
|
||||
root: root_path,
|
||||
temp_dir,
|
||||
cache_dir,
|
||||
python_dir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue