stages:
- lint
- test
- build
variables:
CARGO_HOME: "$CI_PROJECT_DIR/.cargo"
CARGO_TERM_COLOR: "always"
default:
image: rust:1-slim
before_script:
- apt-get update -qq && apt-get install -y -qq pkg-config libssl-dev 2>/dev/null || true
- rustup component add rustfmt clippy
cache:
key:
files:
- Cargo.toml
paths:
- .cargo/registry/cache
- .cargo/registry/index
- target
fmt:
stage: lint
script:
- cargo fmt --all -- --check
clippy:
stage: lint
script:
- cargo clippy --all-targets --all-features -- -D warnings
test:
stage: test
script:
- cargo test --all-features --verbose
build:
stage: build
script:
- cargo build --release --verbose
artifacts:
name: "ai-refactor-cli-$CI_COMMIT_SHORT_SHA"
paths:
- target/release/ai-refactor
expire_in: 30 days