Add wasm tests to the CI.
This commit is contained in:
parent
28a3e1bc7b
commit
0897061ff6
@ -115,7 +115,7 @@ spec:
|
|||||||
[
|
[
|
||||||
--no-default-features,
|
--no-default-features,
|
||||||
--features,
|
--features,
|
||||||
compare,
|
"compare,wasm_test",
|
||||||
--no-fail-fast,
|
--no-fail-fast,
|
||||||
--lib,
|
--lib,
|
||||||
--test,
|
--test,
|
||||||
|
5
Makefile
5
Makefile
@ -63,6 +63,11 @@ dockertest:
|
|||||||
> $(MAKE) -C docker/organic_test
|
> $(MAKE) -C docker/organic_test
|
||||||
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare --no-fail-fast --lib --test test_loader -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
|
.PHONY: dockerwasmtest
|
||||||
|
dockerwasmtest:
|
||||||
|
> $(MAKE) -C docker/organic_test
|
||||||
|
> docker run --init --rm -i -t --read-only -v "$$(readlink -f ./):/source:ro" --mount type=tmpfs,destination=/tmp --mount source=cargo-cache,target=/usr/local/cargo/registry --mount source=rust-cache,target=/target --env CARGO_TARGET_DIR=/target -w /source organic-test --no-default-features --features compare,wasm_test --no-fail-fast --lib --test test_loader autogen_wasm_ -- --test-threads $(TESTJOBS)
|
||||||
|
|
||||||
.PHONY: buildtest
|
.PHONY: buildtest
|
||||||
buildtest:
|
buildtest:
|
||||||
> cargo build --no-default-features
|
> cargo build --no-default-features
|
||||||
|
@ -60,3 +60,13 @@ async fn autogen_odd_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
|||||||
assert!(organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?);
|
assert!(organic::compare::run_anonymous_compare_with_settings(org_contents.as_str(), &global_settings, false).await?);
|
||||||
Ok(())
|
Ok(())
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
#[cfg(feature = "wasm_test")]
|
||||||
|
{expect_fail}
|
||||||
|
#[tokio::test]
|
||||||
|
async fn autogen_wasm_{name}() -> Result<(), Box<dyn std::error::Error>> {{
|
||||||
|
let org_path = "{path}";
|
||||||
|
let org_contents = std::fs::read_to_string(org_path).expect("Read org file.");
|
||||||
|
assert!(organic::wasm_test::wasm_run_anonymous_compare(org_contents.as_str()).await?);
|
||||||
|
Ok(())
|
||||||
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user