pastebin/.gitlab-ci.yml
2019-09-20 19:35:31 +02:00

33 lines
622 B
YAML

build:
image: rust:latest
script:
- apt update
- apt install -y npm
- &print_version rustc --version && cargo --version
- cargo build --release --verbose
artifacts:
paths:
- 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/