diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e126300dc5192775b9516ea65e2e307b2b68daf3 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/rust/tags/ +image: "rust:1.70-alpine3.17" +# Use cargo to test the project +test:cargo: + script: + - rustc --version && cargo --version # Print version info for debugging + +run_test_doc: + script: + - cd codes + - ./run_tests.sh diff --git a/codes/run_tests.sh b/codes/run_tests.sh new file mode 100755 index 0000000000000000000000000000000000000000..feb0a29ac894795b6b4616658ab33ee2b1c2abf8 --- /dev/null +++ b/codes/run_tests.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +make -C c_lang/min_list +cd rust_lang +for d in *; do + echo ==================== Running cargo run for $d ==================== + cargo run --manifest-path $d/Cargo.toml + echo ==================== Running cargo test for $d ==================== + cargo test --manifest-path $d/Cargo.toml --workspace --verbose + echo ==================== Running cargo doc for $d ==================== + cargo doc --manifest-path $d/Cargo.toml +done