1
0
Fork 0
mirror of https://github.com/shouptech/tempgopher.git synced 2026-02-03 16:49:42 +00:00
tempgopher/.gitlab-ci.yml
Mike Shoup c37d491e86 Moved to GitLab and setup CI
* Renamed temp-gopher references to tempgopher
* Added to GitLab CI
2018-10-04 17:57:39 -06:00

36 lines
725 B
YAML

image: golang:1.11
variables:
binary_name: tempgopher
project_prefix: gitlab.com/shouptech
project_path: $project_prefix/tempgopher
stages:
- test
- build
before_script:
- mkdir -p ${GOPATH}/src/${project_prefix}
- cp -r ${CI_PROJECT_DIR} ${GOPATH}/src/${project_path}
- cd ${GOPATH}/src/${project_path}
- go get -v ./...
test:
stage: test
variables:
GIN_MODE: debug
script:
- go get -v -t ./...
- go test -v
build:
stage: build
variables:
build_binary: $CI_PROJECT_DIR/${binary_name}
script:
- go get -v github.com/gobuffalo/packr/...
- GOOS=linux GOARCH=arm GOARM=6 packr build -v -a -ldflags '-s -w -extldflags "-static"' -o ${build_binary}
artifacts:
paths:
- tempgopher