From f16a006c233f408ae9be5f7ccc1dd2bbee467b68 Mon Sep 17 00:00:00 2001 From: Shashank Trivedi <100513286+lordshashank@users.noreply.github.com> Date: Sat, 23 Mar 2024 01:02:34 +0530 Subject: [PATCH] CI cargo test added (#6) --- .github/workflows/ci.yml | 9 ++++++++- tests/hello-world/Cargo.toml | 4 ++++ tests/hello-world/src/main.rs | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/hello-world/Cargo.toml create mode 100644 tests/hello-world/src/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44730bab4ed1..9b2c7ab5e30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,7 +80,14 @@ jobs: ./y.sh prepare --only-libcore ./y.sh build cargo test - ./y.sh clean all + + - name: Run y.sh cargo build + run: | + ./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml + + - name: Clean + run: | + ./y.sh clean all - name: Prepare dependencies run: | diff --git a/tests/hello-world/Cargo.toml b/tests/hello-world/Cargo.toml new file mode 100644 index 000000000000..a3b6813443f7 --- /dev/null +++ b/tests/hello-world/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "hello_world" + +[dependencies] \ No newline at end of file diff --git a/tests/hello-world/src/main.rs b/tests/hello-world/src/main.rs new file mode 100644 index 000000000000..fbedd9205254 --- /dev/null +++ b/tests/hello-world/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} \ No newline at end of file