Skip to content

Commit aa73566

Browse files
authored
Conda ci tests (#13)
1 parent ccac7ee commit aa73566

File tree

7 files changed

+392
-40
lines changed

7 files changed

+392
-40
lines changed

.github/workflows/pr-check.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ jobs:
132132
shell: bash
133133

134134
- name: Run Tests
135-
run: cargo test --frozen --all-features
135+
run: cargo test --frozen --all-features -- --nocapture
136136
shell: bash
137137

138138
- name: Find Environments
139139
if: matrix.run_cli == 'yes'
140140
run: cargo run --release --target ${{ matrix.target }}
141141
shell: bash
142-
142+
143143
builds:
144144
name: Builds
145145
runs-on: ${{ matrix.os }}
@@ -183,7 +183,9 @@ jobs:
183183
shell: bash
184184

185185
- name: Run Tests
186-
run: cargo test --frozen --all-features
186+
# We do not want to run all features, CI is only for tests with Python
187+
# Thats a separate job.
188+
run: cargo test --frozen
187189
shell: bash
188190

189191
- name: Build

crates/pet-conda/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ pet-core = { path = "../pet-core" }
1111
pet-utils = { path = "../pet-utils" }
1212
log = "0.4.21"
1313
regex = "1.10.4"
14+
15+
[features]
16+
ci = []

crates/pet-conda/src/environment_locations.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,7 @@ pub fn get_known_conda_install_locations(env_vars: &EnvVariables) -> Vec<PathBuf
182182
known_paths.push(PathBuf::from(conda_prefix.clone()));
183183
}
184184
if let Some(ref conda) = env_vars.conda {
185-
let conda = PathBuf::from(conda);
186-
if let Some(parent) = conda.parent() {
187-
known_paths.push(parent.to_path_buf());
188-
}
185+
known_paths.push(PathBuf::from(conda));
189186
}
190187
if let Some(home) = env_vars.clone().home {
191188
known_paths.push(home.clone().join("anaconda3"));
@@ -233,10 +230,7 @@ pub fn get_known_conda_install_locations(env_vars: &EnvVariables) -> Vec<PathBuf
233230
known_paths.push(PathBuf::from(conda_prefix.clone()));
234231
}
235232
if let Some(ref conda) = env_vars.conda {
236-
let conda = PathBuf::from(conda);
237-
if let Some(parent) = conda.parent() {
238-
known_paths.push(parent.to_path_buf());
239-
}
233+
known_paths.push(PathBuf::from(conda));
240234
}
241235
if let Some(ref home) = env_vars.home {
242236
known_paths.push(home.clone().join("anaconda"));

crates/pet-conda/src/environments.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ pub fn get_activation_command(
235235

236236
#[cfg(test)]
237237
mod tests {
238+
#[cfg(windows)]
238239
use super::*;
239240

240241
#[test]

0 commit comments

Comments
 (0)