pastebin/.gitlab-ci.yml

53 lines
908 B
YAML
Raw Normal View History

2019-11-19 13:23:09 +00:00
build:webpack:
stage: build
image: node:12.13
script:
- npm ci
- node_modules/.bin/webpack
artifacts:
paths:
- static
- entry
build:release: &build
stage: test
2019-09-20 08:20:56 +00:00
image: rust:latest
2019-08-05 20:30:29 +00:00
script:
2019-11-19 13:23:09 +00:00
- &init rustc --version && cargo --version
2019-08-05 20:30:29 +00:00
- cargo build --release --verbose
artifacts:
paths:
2019-11-22 20:37:27 +00:00
- languages.json
2019-09-20 17:54:27 +00:00
- migrations
- static
2019-11-22 20:37:27 +00:00
- target/release/pastebinrun
2019-09-20 09:13:29 +00:00
cache:
key: release
paths:
2019-11-19 13:23:09 +00:00
- target
2019-08-09 08:00:40 +00:00
2019-09-20 08:20:56 +00:00
test:stable: &test
2019-11-19 13:23:09 +00:00
stage: test
2019-08-09 09:45:34 +00:00
services:
- postgres
variables:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
2019-09-20 08:20:56 +00:00
image: rust:latest
2019-08-09 09:45:34 +00:00
script:
2019-11-19 12:50:42 +00:00
- *init
- DATABASE_URL=postgresql://user:password@postgres/db cargo test --verbose --features=database_tests
2019-09-20 09:13:29 +00:00
cache:
2019-11-19 13:23:09 +00:00
key: ${CI_JOB_NAME}
2019-09-20 09:13:29 +00:00
paths:
- target/
2019-11-19 13:23:09 +00:00
test:1.39:
<<: *test
image: rust:1.39
test:nightly:
<<: *test
image: rustlang/rust:nightly