bc7970e788
Add a feature for database tests See merge request pastebin.run/server!56
37 lines
718 B
YAML
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/
|