2019-11-19 13:23:09 +00:00
|
|
|
build:webpack:
|
|
|
|
stage: build
|
2020-02-13 00:38:21 +00:00
|
|
|
image: node:12.16
|
2019-11-19 13:23:09 +00:00
|
|
|
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:
|
2020-03-10 09:03:03 +00:00
|
|
|
- &init rustc --version && cargo --version
|
2019-08-05 20:30:29 +00:00
|
|
|
- cargo build --release --verbose
|
2020-01-06 18:58:29 +00:00
|
|
|
needs:
|
|
|
|
- build:webpack
|
2019-08-05 20:30:29 +00:00
|
|
|
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-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
|
2019-12-31 12:54:55 +00:00
|
|
|
- name: registry.gitlab.com/pastebinrun/sandbox/master
|
2019-12-22 22:00:56 +00:00
|
|
|
alias: sandbox
|
2019-08-09 09:45:34 +00:00
|
|
|
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
|
2019-12-22 22:00:56 +00:00
|
|
|
- DATABASE_URL=postgresql://user:password@postgres/db SANDBOX_URL=http://sandbox:8888 cargo test --verbose --features=database_tests,sandbox_tests
|
2020-01-06 18:58:29 +00:00
|
|
|
needs:
|
|
|
|
- build:webpack
|
2019-11-19 13:23:09 +00:00
|
|
|
|
2020-01-17 11:43:00 +00:00
|
|
|
test:clippy:
|
|
|
|
<<: *test
|
|
|
|
script:
|
|
|
|
- *init
|
|
|
|
- rustup component add clippy
|
|
|
|
- cargo clippy --verbose
|
|
|
|
|
2021-06-08 07:16:30 +00:00
|
|
|
test:1.52:
|
2019-11-19 13:23:09 +00:00
|
|
|
<<: *test
|
2021-06-08 07:16:30 +00:00
|
|
|
image: rust:1.52
|
2019-11-19 13:23:09 +00:00
|
|
|
|
|
|
|
test:nightly:
|
|
|
|
<<: *test
|
|
|
|
image: rustlang/rust:nightly
|
2020-01-06 18:40:22 +00:00
|
|
|
allow_failure: yes
|