oembed/.gitlab-ci.yml

32 lines
714 B
YAML

image: golang:alpine
stages:
- test
- review
before_script:
- apk add --no-cache git build-base bash make
- mkdir -p /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds
- cp -r $CI_PROJECT_DIR /go/src/gitlab.com/$CI_PROJECT_PATH
- ln -s /go/src/gitlab.com/$CI_PROJECT_NAMESPACE /go/src/_/builds/$CI_PROJECT_NAMESPACE
- go get github.com/golangci/golangci-lint/cmd/golangci-lint
- go install github.com/golangci/golangci-lint/cmd/golangci-lint
- make dep
unit_tests:
stage: test
script:
- make test
code_coverage:
stage: test
script:
- make coverage
coverage: '/^coverage:\s(\d+(?:\.\d+)?%)/'
lint_code:
stage: review
script:
- make lint
allow_failure: true