Skip to content

Instantly share code, notes, and snippets.

@eljamm
Forked from LukeMathWalker/.gitlab-ci.yml
Created February 13, 2024 09:24
Show Gist options
  • Save eljamm/d637ed6498349538751825486c6cea41 to your computer and use it in GitHub Desktop.
Save eljamm/d637ed6498349538751825486c6cea41 to your computer and use it in GitHub Desktop.
GitLab CI - Rust setup
image: "rust:latest"
default:
before_script:
- rustc --version
- cargo --version
stages:
- test
test-code:
stage: test
script:
- cargo test
- cargo install cargo-tarpaulin
- cargo tarpaulin --ignore-tests
lint-code:
stage: test
script:
- rustup component add clippy
- cargo clippy -- -D warnings
format-code:
stage: test
script:
- rustup component add rustfmt
- cargo fmt -- --check
audit-code:
stage: test
script:
- cargo install cargo-audit
- cargo audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment