-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: cargo test takes too long to test (#90)
* fix: ignore unit tests take so long * chore: change ci to run only unit tests * docs: add reason in ignored tests * fix: e2e under feature test * refactor: rename one test * chore: run all tests in CI * fix: pr feedback * fix: remove ignore tests * docs: update README * chore: fmt
- Loading branch information
Showing
7 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,4 +65,4 @@ jobs: | |
run: cargo build | ||
|
||
- name: Run tests | ||
run: cargo test --verbose | ||
run: cargo test --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#![cfg(feature = "e2e_parachain")] | ||
use anyhow::{Error, Result}; | ||
use assert_cmd::Command; | ||
|
||
fn setup_test_environment() -> Result<tempfile::TempDir, Error> { | ||
let temp_dir = tempfile::tempdir().unwrap(); | ||
// pop new parachain test_parachain | ||
Command::cargo_bin("pop") | ||
.unwrap() | ||
.current_dir(&temp_dir) | ||
.args(&["new", "parachain", "test_parachain"]) | ||
.assert() | ||
.success(); | ||
|
||
Ok(temp_dir) | ||
} | ||
|
||
#[test] | ||
fn test_parachain_build_after_instantiating_template() -> Result<()> { | ||
let temp_dir = setup_test_environment()?; | ||
|
||
// pop build contract -p "./test_parachain" | ||
Command::cargo_bin("pop") | ||
.unwrap() | ||
.current_dir(&temp_dir) | ||
.args(&["build", "parachain", "-p", "./test_parachain"]) | ||
.assert() | ||
.success(); | ||
|
||
assert!(temp_dir.path().join("test_parachain/target").exists()); | ||
Ok(()) | ||
} |