Merge pull request #70 from go-gitea/drone-upgrade
Changes for latest DroneCI
This commit is contained in:
commit
efc028eef5
3 changed files with 21 additions and 10 deletions
22
.drone.yml
22
.drone.yml
|
@ -2,9 +2,15 @@ workspace:
|
||||||
base: /srv/app
|
base: /srv/app
|
||||||
path: src/code.gitea.io/sdk
|
path: src/code.gitea.io/sdk
|
||||||
|
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: plugins/git:1
|
||||||
|
depth: 50
|
||||||
|
tags: true
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
testing:
|
testing:
|
||||||
image: webhippie/golang:latest
|
image: webhippie/golang:edge
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- make clean
|
- make clean
|
||||||
|
@ -13,14 +19,16 @@ pipeline:
|
||||||
- make test
|
- make test
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
coverage:
|
# coverage:
|
||||||
image: plugins/coverage
|
# image: plugins/coverage:1
|
||||||
server: https://coverage.gitea.io
|
# pull: true
|
||||||
|
# secrets: [ github_token ]
|
||||||
|
# server: https://coverage.gitea.io
|
||||||
|
|
||||||
discord:
|
discord:
|
||||||
image: appleboy/drone-discord
|
image: appleboy/drone-discord:1.0.0
|
||||||
webhook_id: ${WEBHOOK_ID}
|
pull: true
|
||||||
webhook_token: ${WEBHOOK_TOKEN}
|
secrets: [ discord_webhook_id, discord_webhook_token ]
|
||||||
when:
|
when:
|
||||||
event: [ push, tag, pull_request ]
|
event: [ push, tag, pull_request ]
|
||||||
status: [ changed, failure ]
|
status: [ changed, failure ]
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vc2RrCgpwaXBlbGluZToKICB0ZXN0aW5nOgogICAgaW1hZ2U6IHdlYmhpcHBpZS9nb2xhbmc6bGF0ZXN0CiAgICBwdWxsOiB0cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBtYWtlIGNsZWFuCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgLSBtYWtlIGxpbnQKICAgICAgLSBtYWtlIHRlc3QKICAgICAgLSBtYWtlIGJ1aWxkCgogIGNvdmVyYWdlOgogICAgaW1hZ2U6IHBsdWdpbnMvY292ZXJhZ2UKICAgIHNlcnZlcjogaHR0cHM6Ly9jb3ZlcmFnZS5naXRlYS5pbwoKICBkaXNjb3JkOgogICAgaW1hZ2U6IGFwcGxlYm95L2Ryb25lLWRpc2NvcmQKICAgIHdlYmhvb2tfaWQ6ICR7V0VCSE9PS19JRH0KICAgIHdlYmhvb2tfdG9rZW46ICR7V0VCSE9PS19UT0tFTn0KICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2gsIHRhZywgcHVsbF9yZXF1ZXN0IF0KICAgICAgc3RhdHVzOiBbIGNoYW5nZWQsIGZhaWx1cmUgXQo.-M9-fmfqXZyJSXKjOzet4ggbiwZzgaCjVhRuROAvChw
|
|
8
Makefile
8
Makefile
|
@ -1,6 +1,6 @@
|
||||||
IMPORT := code.gitea.io/sdk
|
IMPORT := code.gitea.io/sdk
|
||||||
|
|
||||||
PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
|
PACKAGES ?= $(shell go list -e ./... | grep -v /vendor/ | grep -v /benchmark/)
|
||||||
GENERATE ?= code.gitea.io/sdk/gitea
|
GENERATE ?= code.gitea.io/sdk/gitea
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
@ -18,7 +18,7 @@ generate:
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt:
|
fmt:
|
||||||
find . -name "*.go" -type f -not -path "./vendor/*" | xargs gofmt -s -w
|
find . -name "*.go" -type f ! -path "./vendor/*" ! -path "./benchmark/*" | xargs gofmt -s -w
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet:
|
vet:
|
||||||
|
@ -35,6 +35,10 @@ lint:
|
||||||
test:
|
test:
|
||||||
for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
|
for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
|
||||||
|
|
||||||
|
.PHONY: bench
|
||||||
|
bench:
|
||||||
|
go test -run=XXXXXX -benchtime=10s -bench=. || exit 1
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
go build ./gitea
|
go build ./gitea
|
||||||
|
|
Loading…
Reference in a new issue