26 lines
740 B
YAML
26 lines
740 B
YAML
image: archlinux
|
|
secrets:
|
|
- 36f65f02-9e26-497e-94d7-f1cd8ba3ef7a
|
|
packages:
|
|
- go
|
|
sources:
|
|
- https://github.com/go-ap/handlers
|
|
environment:
|
|
GO111MODULE: 'on'
|
|
tasks:
|
|
- setup: |
|
|
cd handlers && go mod download
|
|
- tests: |
|
|
cd handlers
|
|
go test -v ./...
|
|
- coverage: |
|
|
set -a +x
|
|
source ~/.code-cov.sh
|
|
cd handlers
|
|
go test -cover -coverprofile handlers.coverprofile ./...
|
|
GIT_SHA=$(git rev-parse --verify HEAD)
|
|
GIT_BRANCH=$(git name-rev --name-only HEAD)
|
|
curl -X POST \
|
|
--data-binary @handlers.coverprofile \
|
|
-H 'Accept: application/json' \
|
|
"https://codecov.io/upload/v2?commit=${GIT_SHA}&token=${HANDLERS_TOKEN}&branch=${GIT_BRANCH}&service=custom"
|