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