f687b382b1
This version is currently used in production.
59 lines
1.1 KiB
YAML
59 lines
1.1 KiB
YAML
build:webpack:
|
|
stage: build
|
|
image: node:12.16
|
|
script:
|
|
- npm ci
|
|
- node_modules/.bin/webpack
|
|
artifacts:
|
|
paths:
|
|
- static
|
|
- entry
|
|
|
|
build:release: &build
|
|
stage: test
|
|
image: rust:latest
|
|
script:
|
|
- &init rustc --version && cargo --version
|
|
- cargo build --release --verbose
|
|
needs:
|
|
- build:webpack
|
|
artifacts:
|
|
paths:
|
|
- languages.json
|
|
- migrations
|
|
- static
|
|
- target/release/pastebinrun
|
|
|
|
test:stable: &test
|
|
stage: test
|
|
services:
|
|
- postgres
|
|
- name: registry.gitlab.com/pastebinrun/sandbox/master
|
|
alias: sandbox
|
|
variables:
|
|
POSTGRES_DB: db
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
image: rust:latest
|
|
script:
|
|
- *init
|
|
- DATABASE_URL=postgresql://user:password@postgres/db SANDBOX_URL=http://sandbox:8888 cargo test --verbose --features=database_tests,sandbox_tests
|
|
needs:
|
|
- build:webpack
|
|
|
|
test:clippy:
|
|
<<: *test
|
|
script:
|
|
- *init
|
|
- rustup component add clippy
|
|
- cargo clippy --verbose
|
|
|
|
test:1.52:
|
|
<<: *test
|
|
image: rust:1.52
|
|
|
|
test:nightly:
|
|
<<: *test
|
|
image: rustlang/rust:nightly
|
|
allow_failure: yes
|