Added builds.sr.ht file with codecov support
This commit is contained in:
parent
2e036cae46
commit
3d7adae61a
26
.build.yml
Normal file
26
.build.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
image: archlinux
|
||||
secrets:
|
||||
- 36f65f02-9e26-497e-94d7-f1cd8ba3ef7a
|
||||
packages:
|
||||
- go
|
||||
sources:
|
||||
- https://github.com/go-ap/activitypub
|
||||
environment:
|
||||
GO111MODULE: 'on'
|
||||
tasks:
|
||||
- setup: |
|
||||
cd activitypub && go mod download
|
||||
- tests: |
|
||||
cd activitypub
|
||||
go test -v ./...
|
||||
- coverage: |
|
||||
set -a +x
|
||||
source ~/.code-cov.sh
|
||||
cd activitypub
|
||||
go test -cover -coverprofile activitypub.coverprofile ./...
|
||||
GIT_SHA=$(git rev-parse --verify HEAD)
|
||||
GIT_BRANCH=$(git name-rev --name-only HEAD)
|
||||
curl -X POST \
|
||||
--data-binary @activitypub.coverprofile \
|
||||
-H 'Accept: application/json' \
|
||||
"https://codecov.io/upload/v2?commit=${GIT_SHA}&token=${PUB_TOKEN}&branch=${GIT_BRANCH}&service=custom"
|
Reference in a new issue