pastebin/.gitlab-ci.yml
Konrad Borowski bc7970e788 Merge branch 'add-a-feature-for-database-tests' into 'master'
Add a feature for database tests

See merge request pastebin.run/server!56
2019-10-13 17:39:06 +00:00

37 lines
718 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:
- migrations
- static
- target/release/pastebinrun
cache:
key: release
paths:
- node_modules/
- 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 --features=database_tests
cache:
key: debug
paths:
- node_modules/
- target/