build: image: rust:latest script: - apt update - apt install -y npm - &print_version rustc --version && cargo --version - cargo build --release --verbose artifacts: paths: - migrations - static - target/release/pastebinrun cache: key: release paths: - target/ test:stable: &test services: - postgres variables: POSTGRES_DB: db POSTGRES_USER: user POSTGRES_PASSWORD: password image: rust:latest script: - apt update - apt install -y npm - *print_version - DATABASE_URL=postgresql://user:password@postgres/db cargo test --verbose cache: key: debug paths: - target/