From bc355ea3ee10a75585ef4bbd4641cd7789b25f71 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Thu, 2 May 2019 18:51:22 +0300 Subject: [PATCH] CI: refactor to use 'extends' instead of anchors --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dae76f621..19ec9c1e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: - "test" - "extras" -.tarball_setup: &setup +.tarball_setup: variables: # Only stuff inside the repo directory can be cached # Override the CARGO_HOME variable to force its location @@ -40,9 +40,9 @@ stages: paths: - "${CARGO_HOME}" -.cargo_test_template: &cargo_test +.cargo test: + extends: '.tarball_setup' stage: "test" - <<: *setup script: - rustc --version - cargo build --color=always --all @@ -54,20 +54,20 @@ test 1.31: # 1.31 img # https://hub.docker.com/_/rust/ image: "rust:1.31-slim" - <<: *cargo_test + extends: '.cargo test' test stable: # Stable img # https://hub.docker.com/_/rust/ image: "rust:slim" - <<: *cargo_test + extends: '.cargo test' test nightly: # Nightly # https://hub.docker.com/r/rustlang/rust/ image: "rustlang/rust:nightly-slim" allow_failure: true - <<: *cargo_test + extends: '.cargo test' rustfmt: image: "rust:slim" @@ -78,9 +78,9 @@ rustfmt: - cargo fmt -- --color=always --check clippy: + extends: '.tarball_setup' image: "rust:slim" stage: 'extras' - <<: *setup script: - rustup component add clippy-preview - cargo clippy --version