2020-09-27 19:21:32 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- quality-assurance
|
|
|
|
|
|
|
|
unit_tests:
|
|
|
|
image: golang:1.15-alpine
|
|
|
|
stage: test
|
|
|
|
before_script:
|
|
|
|
- apk add --no-cache git build-base tcl pkgconfig cmake libressl-dev linux-headers
|
|
|
|
- git clone --depth 1 --branch v1.4.2 https://github.com/Haivision/srt && cd srt && ./configure --enable-apps=OFF && make install && cd .. && rm -rf srt
|
|
|
|
script:
|
|
|
|
- go test -v -covermode=count -coverprofile cover.cov ./...
|
|
|
|
- go tool cover -func=cover.cov
|
|
|
|
|
|
|
|
linters:
|
|
|
|
image: golang:1.15-alpine
|
|
|
|
stage: quality-assurance
|
|
|
|
script:
|
|
|
|
- go get -u golang.org/x/lint/golint
|
2020-09-27 19:31:35 +00:00
|
|
|
- golint -min_confidence 0.3 -set_exit_status ./...
|
|
|
|
allow_failure: true
|