Skip to content

Commit

Permalink
fix(ci): update gcanti/io-ts test cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
McPatate committed Nov 7, 2023
1 parent b344597 commit d0f249e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/testbed/repositories-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ repositories:
build_args: ["run", "build"]
language: typescript
runner: vitest
runner_args: ["run", "vitest", "--", "--no-colors"]
setup_commands:
- ["npm", ["install"]]
holes_file: io-ts-smol.json
Expand Down
1 change: 1 addition & 0 deletions crates/testbed/repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ repositories:
build_args: ["run", "build"]
language: typescript
runner: vitest
runner_args: ["run", "vitest", "--", "--no-colors"]
setup_commands:
- ["npm", ["install"]]
holes_file: io-ts.json
Expand Down
6 changes: 2 additions & 4 deletions crates/testbed/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{path::Path, process::Stdio};
use anyhow::anyhow;
use serde::{Deserialize, Serialize};
use tokio::{io::AsyncReadExt, process::Command};
use tracing::{debug, info};
use tracing::debug;

use crate::parse_env;

Expand Down Expand Up @@ -218,7 +218,7 @@ async fn vitest_runner(
.args(args)
.current_dir(repo_path)
.stdout(Stdio::piped())
// .stderr(Stdio::null())
.stderr(Stdio::null())
.spawn()?;

let mut stdout = String::new();
Expand All @@ -228,14 +228,12 @@ async fn vitest_runner(
.ok_or(anyhow!("failed to take stdout"))?
.read_to_string(&mut stdout)
.await?;
info!("stdout: {stdout}");
let lines = stdout.split_terminator('\n');
let mut passed = 0f32;
let mut failed = 0f32;
for line in lines {
if line.contains("Tests") {
let words = line.trim().split(' ').collect::<Vec<&str>>();
info!("line containing 'Tests': {words:?}");
let mut prev = words[0];
for word in words {
if word.contains("passed") {
Expand Down

0 comments on commit d0f249e

Please sign in to comment.