From 3f0a2b17029ad117be0018bc710a3c20ed84811b Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Wed, 23 Apr 2025 18:52:08 -0600 Subject: [PATCH] testing ci --- .gitlab-ci.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 776bc61..9126f09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,27 @@ -# You can override the included template(s) by including variable overrides -# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings -# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings -# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings -# Note that environment variables can be set in several places -# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence -stages: -- test -sast: - stage: test -include: -- template: Security/SAST.gitlab-ci.yml +image: "rust:latest" + +variables: + # move cargo data into the project directory so it can be cached + CARGO_HOME: ${CI_PROJECT_DIR}/.cargo + # treat compiler warnings as errors (in clippy, when running tests, etc.) + RUSTFLAGS: -Dwarnings + +default: + # cancel the job if a newer pipeline starts for the same MR or branch + interruptible: true + cache: + # use the git branch or tag as cache key, so the cache will be + # shared among CI runs for the same branch or tag + key: ${CI_COMMIT_REF_SLUG} + # we cache .cargo/ and target/, which effectively enables + # incremental builds across different executions of the CI + # for the same branch or the same merge request + paths: + - .cargo + - target + +# a format check is run in parallel with the rest +cargo:fmt: + script: + - rustup component add rustfmt + - cargo fmt --check