38 lines
599 B
YAML
38 lines
599 B
YAML
stages:
|
|
- lint
|
|
- build
|
|
- test
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
lint:
|
|
stage: lint
|
|
image: rust:latest
|
|
script:
|
|
- rustup component add rustfmt clippy
|
|
- cargo fmt --check
|
|
- cargo clippy -- -D warnings
|
|
artifacts:
|
|
paths:
|
|
- "target/"
|
|
|
|
build:
|
|
stage: build
|
|
image: rust:latest
|
|
script:
|
|
- cargo build --release
|
|
artifacts:
|
|
paths:
|
|
- "target/"
|
|
|
|
test:
|
|
stage: test
|
|
image: rust:latest
|
|
script:
|
|
- cargo test --release
|
|
artifacts:
|
|
paths:
|
|
- "target/" |