summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJonas Zohren <git-pbkyr@jzohren.de>2022-02-18 22:29:55 +0100
committerJonas Zohren <git-pbkyr@jzohren.de>2022-02-18 22:29:55 +0100
commit8f063c99d51deef5d35296555b7b1028a610fc1c (patch)
treee765d70ef74b757ffa52ffcb506fdd12655f0239 /.gitlab-ci.yml
parentf3795846b5dcd4e17433eb6f6995820a5f82acdf (diff)
downloadconduit-8f063c99d51deef5d35296555b7b1028a610fc1c.zip
chore(ci): Split up tests
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml15
1 files changed, 12 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bd4ce79..8660f4e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -238,7 +238,7 @@ docker:tags:dockerhub:
# Run tests #
# --------------------------------------------------------------------- #
-test:cargo:
+.test-shared-settings:
stage: "test"
needs: []
image: "registry.gitlab.com/jfowl/conduit-containers/rust-with-tools:latest"
@@ -246,13 +246,15 @@ test:cargo:
variables:
CARGO_INCREMENTAL: "false" # https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
interruptible: true
+
+test:cargo:
+ extends: .test-shared-settings
before_script:
- - rustup component add clippy rustfmt
+ - rustup component add clippy
# If provided, bring in caching through sccache, which uses an external S3 endpoint to store compilation results:
- if [ -n "${SCCACHE_ENDPOINT}" ]; then export RUSTC_WRAPPER=/usr/local/cargo/bin/sccache; fi
script:
- rustc --version && cargo --version # Print version info for debugging
- - cargo fmt --all -- --check
- "cargo test --color always --workspace --verbose --locked --no-fail-fast -- -Z unstable-options --format json | gitlab-report -p test > $CI_PROJECT_DIR/report.xml"
- "cargo clippy --color always --verbose --message-format=json | gitlab-report -p clippy > $CI_PROJECT_DIR/gl-code-quality-report.json"
artifacts:
@@ -261,6 +263,13 @@ test:cargo:
junit: report.xml
codequality: gl-code-quality-report.json
+test:format:
+ extends: .test-shared-settings
+ before_script:
+ - rustup component add rustfmt
+ script:
+ - cargo fmt --all -- --check
+
test:sytest:
stage: "test"
allow_failure: true