Skip to content

Instantly share code, notes, and snippets.

@drconopoima
Forked from LukeMathWalker/.gitlab-ci.yml
Created March 15, 2022 11:31
Show Gist options
  • Save drconopoima/af37c9ff552945f0add6137d3dfe6b09 to your computer and use it in GitHub Desktop.
Save drconopoima/af37c9ff552945f0add6137d3dfe6b09 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