From 6aab250e73541ef5b39d51cbe0bb5291f19fac6c Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Wed, 3 Apr 2019 08:37:17 +0200 Subject: [PATCH] Also run tests during the build phase (for now) Set an option for running doctests so that they can be run without the "`eh_personality` language item not found" popping up. See also: https://github.com/rust-lang/cargo/issues/4251 --- .gitlab-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 510793e..be71860 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,9 +7,9 @@ variables: # Cache the Cargo dir and build artifacts cache: - paths: - - cargo/ - - target/ + paths: + - cargo/ + - target/ # Add the thumbv7em-none-eabihf target for Rust before_script: @@ -19,10 +19,11 @@ before_script: stages: - build -# Run `cargo build` for the project with stable Rust +# Run `cargo build` and `cargo test for the project with stable Rust rust-build: stage: build image: rust:latest script: - rustc --version && cargo --version - cargo build --release --jobs 1 + - env RUSTDOCFLAGS=-Cpanic=abort cargo test -- --test-threads 1