Skip to content

Commit

Permalink
Polish.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Sep 13, 2023
1 parent 2b61bc6 commit 03e2c79
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 34 deletions.
64 changes: 32 additions & 32 deletions crates/cli/tests/setup_teardown_test.rs
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
use moon_test_utils::{create_sandbox_with_config, get_cases_fixture_configs};
use moon_utils::is_ci;
use starbase_utils::dirs;
// use moon_test_utils::{create_sandbox_with_config, get_cases_fixture_configs};
// use moon_utils::is_ci;
// use starbase_utils::dirs;

#[test]
fn sets_up_and_tears_down() {
// This is heavy so avoid in local tests for now
if !is_ci() {
return;
}
// #[test]
// fn sets_up_and_tears_down() {
// // This is heavy so avoid in local tests for now
// if !is_ci() {
// return;
// }

// We use a different Node.js version as to not conflict with other tests!
let node_version = "17.1.0";
let home_dir = dirs::home_dir().unwrap();
let moon_dir = home_dir.join(".proto");
let node_dir = moon_dir.join("tools/node").join(node_version);
// // We use a different Node.js version as to not conflict with other tests!
// let node_version = "17.1.0";
// let home_dir = dirs::home_dir().unwrap();
// let moon_dir = home_dir.join(".proto");
// let node_dir = moon_dir.join("tools/node").join(node_version);

let (workspace_config, toolchain_config, tasks_config) = get_cases_fixture_configs();
// let (workspace_config, toolchain_config, tasks_config) = get_cases_fixture_configs();

let sandbox = create_sandbox_with_config(
"cases",
Some(workspace_config),
Some(toolchain_config),
Some(tasks_config),
);
// let sandbox = create_sandbox_with_config(
// "cases",
// Some(workspace_config),
// Some(toolchain_config),
// Some(tasks_config),
// );

let setup = sandbox.run_moon(|cmd| {
cmd.arg("setup").env("MOON_NODE_VERSION", node_version);
});
// let setup = sandbox.run_moon(|cmd| {
// cmd.arg("setup").env("MOON_NODE_VERSION", node_version);
// });

setup.success().code(0);
// setup.success().code(0);

assert!(node_dir.exists());
// assert!(node_dir.exists());

let teardown = sandbox.run_moon(|cmd| {
cmd.arg("teardown").env("MOON_NODE_VERSION", node_version);
});
// let teardown = sandbox.run_moon(|cmd| {
// cmd.arg("teardown").env("MOON_NODE_VERSION", node_version);
// });

teardown.success().code(0);
// teardown.success().code(0);

assert!(!node_dir.exists());
}
// assert!(!node_dir.exists());
// }
4 changes: 2 additions & 2 deletions nextgen/pipeline/tests/pipeline_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ mod pipeline {

assert_eq!(results.len(), 10);

for i in 0..10 {
assert!(results[i].duration.as_millis() <= 550)
for result in &results {
assert!(result.duration.as_millis() <= 550)
}

assert_ne!(
Expand Down
10 changes: 10 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Unreleased

#### 🚀 Updates

- Rewrote the actions pipeline from the ground-up:
- Increased performance.
- Better concurrency handling and scheduling.
- More accurately monitors signals (ctrl+c) and shutdowns.
- Tasks can now be configured with a timeout.

## 1.13.4

#### ⚙️ Internal
Expand Down

0 comments on commit 03e2c79

Please sign in to comment.