From b80c510d48d3973a4d005222a4419d5b7a451e45 Mon Sep 17 00:00:00 2001 From: Lynne Date: Mon, 26 Apr 2021 20:34:17 +1000 Subject: [PATCH] gitlab ci improvements: cache `target` & `.cargo`, separate test and build --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f92f22b..5cf50be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,13 @@ image: "rust:latest" +variables: + CARGO_HOME: $CI_PROJECT_DIR/.cargo + +cache: + paths: + - target + - .cargo + default: before_script: - rustc --version @@ -12,7 +20,6 @@ build: stage: build script: - cargo build --verbose - - cargo test --verbose cargo-test: stage: test