variables: CARGO_HOME: $CI_PROJECT_DIR/cargo # Default cache for Rust jobs - keyed on Cargo.lock to prune stale dependencies .rust_cache: &rust_cache cache: key: files: - Cargo.lock paths: - $CARGO_HOME/bin/ - $CARGO_HOME/registry/index/ - $CARGO_HOME/registry/cache/ - $CARGO_HOME/git/db/ - target/ build-release: image: rust:latest <<: *rust_cache script: - cargo build --verbose --release artifacts: paths: - target/release/riftenlabs-indexer expire_in: 30 days test: image: rust:latest <<: *rust_cache script: - cargo test --verbose --release format_check: image: rust:latest <<: *rust_cache script: - rustup component add rustfmt - cargo fmt -- --check clippy: image: rust:latest <<: *rust_cache script: - rustup component add clippy - cargo clippy -- -D warnings linters: image: python:latest script: - ./linters/run_linters.py build-api-docs: image: python:latest script: - ./contrib/api_doc_generator.py artifacts: paths: - apidoc expire_in: 30 days