From de5155068df2415c532fc0dfc68ec2e7f311f3f3 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 22 Aug 2017 19:20:39 +0200 Subject: [PATCH] Changes for latest DroneCI --- .drone.yml | 22 +++++++++++++++------- .drone.yml.sig | 1 - Makefile | 8 ++++++-- 3 files changed, 21 insertions(+), 10 deletions(-) delete mode 100644 .drone.yml.sig diff --git a/.drone.yml b/.drone.yml index 97d1633..9bc5806 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,9 +2,15 @@ workspace: base: /srv/app path: src/code.gitea.io/sdk +clone: + git: + image: plugins/git:1 + depth: 50 + tags: true + pipeline: testing: - image: webhippie/golang:latest + image: webhippie/golang:edge pull: true commands: - make clean @@ -13,14 +19,16 @@ pipeline: - make test - make build - coverage: - image: plugins/coverage - server: https://coverage.gitea.io + # coverage: + # image: plugins/coverage:1 + # pull: true + # secrets: [ github_token ] + # server: https://coverage.gitea.io discord: - image: appleboy/drone-discord - webhook_id: ${WEBHOOK_ID} - webhook_token: ${WEBHOOK_TOKEN} + image: appleboy/drone-discord:1.0.0 + pull: true + secrets: [ discord_webhook_id, discord_webhook_token ] when: event: [ push, tag, pull_request ] status: [ changed, failure ] diff --git a/.drone.yml.sig b/.drone.yml.sig deleted file mode 100644 index c0e8dd0..0000000 --- a/.drone.yml.sig +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vc2RrCgpwaXBlbGluZToKICB0ZXN0aW5nOgogICAgaW1hZ2U6IHdlYmhpcHBpZS9nb2xhbmc6bGF0ZXN0CiAgICBwdWxsOiB0cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBtYWtlIGNsZWFuCiAgICAgIC0gbWFrZSB2ZXQKICAgICAgLSBtYWtlIGxpbnQKICAgICAgLSBtYWtlIHRlc3QKICAgICAgLSBtYWtlIGJ1aWxkCgogIGNvdmVyYWdlOgogICAgaW1hZ2U6IHBsdWdpbnMvY292ZXJhZ2UKICAgIHNlcnZlcjogaHR0cHM6Ly9jb3ZlcmFnZS5naXRlYS5pbwoKICBkaXNjb3JkOgogICAgaW1hZ2U6IGFwcGxlYm95L2Ryb25lLWRpc2NvcmQKICAgIHdlYmhvb2tfaWQ6ICR7V0VCSE9PS19JRH0KICAgIHdlYmhvb2tfdG9rZW46ICR7V0VCSE9PS19UT0tFTn0KICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2gsIHRhZywgcHVsbF9yZXF1ZXN0IF0KICAgICAgc3RhdHVzOiBbIGNoYW5nZWQsIGZhaWx1cmUgXQo.-M9-fmfqXZyJSXKjOzet4ggbiwZzgaCjVhRuROAvChw \ No newline at end of file diff --git a/Makefile b/Makefile index 6c517ff..6e2ea05 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ 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 .PHONY: all @@ -18,7 +18,7 @@ generate: .PHONY: 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 vet: @@ -35,6 +35,10 @@ lint: test: 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 build: go build ./gitea