add test code
This commit is contained in:
@@ -15,6 +15,7 @@ variables:
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- push
|
||||
- artifacts
|
||||
- release
|
||||
@@ -26,6 +27,16 @@ stages:
|
||||
when: never
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
|
||||
test_code:
|
||||
stage: test
|
||||
image: golang:latest
|
||||
<<: *rules
|
||||
script:
|
||||
- cd app
|
||||
- CGO_ENABLED=0 GOOS=linux GO111MODULE=auto go test
|
||||
tags:
|
||||
- docker
|
||||
|
||||
build_main:
|
||||
stage: build
|
||||
image: golang:latest
|
||||
|
Reference in New Issue
Block a user