diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 69544e00..8087cb0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,23 @@ stages: - release - distribute +format: + stage: test + image: rust:latest + before_script: + - rustup component add rustfmt + + script: + - cargo fmt --all -- --check --verbose + + cache: + key: fmt-cache + paths: + - ~/.cargo/bin/ + - ~/.cargo/git/db/ + - ~/.cargo/registry/cache/ + - ~/.cargo/registry/index/ + # base earthly setup for jobs .base: tags: [ saas-linux-medium-amd64 ]