Skip to content

Commit

Permalink
trial of build test process
Browse files Browse the repository at this point in the history
remove the 'scratch' branch from on push
  • Loading branch information
Coder-Harshit committed Sep 9, 2024
1 parent b46dc68 commit eee69bb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 36 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: [ "main","scratch" ]
pull_request:
branches: [ "main" ]

Expand All @@ -12,8 +12,11 @@ env:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build
Expand Down
68 changes: 34 additions & 34 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@
mod tests {
use std::process::Command;


#[test]
fn test_ospect_runs() {
let result = Command::new("target/release/ospect") // Specify the binary path
.output()
.expect("Failed to execute command (BASIC)");
assert!(result.status.success());
}

#[test]
fn test_ospect_network_runs() {
let result = Command::new("target/release/ospect") // Specify the binary path
.arg("network")
.output()
.expect("Failed to execute command (NETWORK)");
assert!(result.status.success());
}

#[test]
fn test_ospect_os_runs() {
let result = Command::new("target/release/ospect") // Specify the binary path
.arg("os")
.output()
.expect("Failed to execute command (OS)");
assert!(result.status.success());
}
// #[test]
// fn test_ospect_network_runs() {
// let result = Command::new("target/release/ospect") // Specify the binary path
// .arg("network")
// .output()
// .expect("Failed to execute command (NETWORK)");
// assert!(result.status.success());
// }

#[test]
fn test_ospect_hardware_runs() {
let result = Command::new("target/release/ospect") // Specify the binary path
.arg("hardware")
.output()
.expect("Failed to execute command (HARDWARE)");
assert!(result.status.success());
}
// #[test]
// fn test_ospect_os_runs() {
// let result = Command::new("target/release/ospect") // Specify the binary path
// .arg("os")
// .output()
// .expect("Failed to execute command (OS)");
// assert!(result.status.success());
// }

// #[test]
// fn test_ospect_hardware_runs() {
// let result = Command::new("target/release/ospect") // Specify the binary path
// .arg("hardware")
// .output()
// .expect("Failed to execute command (HARDWARE)");
// assert!(result.status.success());
// }

#[test]
fn test_ospect_all_runs() {
let result = Command::new("target/release/ospect") // Specify the binary path
.arg("all")
.output()
.expect("Failed to execute command (ALL)");
assert!(result.status.success());
}

// #[test]
// fn test_ospect_all_runs() {
// let result = Command::new("target/release/ospect") // Specify the binary path
// .arg("all")
// .output()
// .expect("Failed to execute command (ALL)");
// assert!(result.status.success());
// }
}

0 comments on commit eee69bb

Please sign in to comment.