image: rust:latest
stages:
- fmt
- clippy
- test
fmt:
stage: fmt
only:
- main
- merge_requests
script:
- rustup component add rustfmt
- cargo fmt --all --check
clippy:
stage: clippy
script:
- rustup component add clippy
- cargo clippy --all-targets --all-features -- -D warnings
test:
stage: test
script:
- cargo test --all-features