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
This commit is contained in:
Paul van Tilburg 2019-04-03 08:37:17 +02:00
parent de70a03c11
commit 6aab250e73
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 5 additions and 4 deletions

View File

@ -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