f9a269de95
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
42 lines
1013 B
YAML
42 lines
1013 B
YAML
stages:
|
|
- build-src
|
|
- build-docker
|
|
- go-test
|
|
|
|
build-src:
|
|
stage: build-src
|
|
image: debian:buster
|
|
variables:
|
|
GOPATH: $CI_PROJECT_DIR
|
|
script:
|
|
- apt update
|
|
- apt install -y curl gnupg git make golang
|
|
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
|
|
- apt update
|
|
- apt install -y nodejs
|
|
- npm install -g html-minifier uglify-js sass
|
|
- mkdir -p src/gitlab.com/commento && cd src/gitlab.com/commento && ln -s $CI_PROJECT_DIR && cd $CI_PROJECT_NAME
|
|
- make devel
|
|
- make prod
|
|
|
|
build-docker:
|
|
stage: build-docker
|
|
image: docker:stable
|
|
script:
|
|
- docker build -t commento-ce .
|
|
|
|
go-test:
|
|
stage: go-test
|
|
image: golang:1.10.2
|
|
services:
|
|
- postgres:latest
|
|
variables:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: commento_test
|
|
COMMENTO_POSTGRES: postgres://postgres:postgres@postgres/commento_test?sslmode=disable
|
|
script:
|
|
- cd api
|
|
- (go get -v . || true) # TODO: remove this ugly hack
|
|
- go test -v .
|