From f7ebf4bb01b56162ec288260553fa858c607e9af Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 3 Feb 2020 13:20:31 +0100 Subject: [PATCH] move coverage step to test pipeline --- .drone.star | 38 +++++++++++++++++++------------------- .drone.yml | 26 +++++++++++++------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.drone.star b/.drone.star index 8a87320..48a08a7 100644 --- a/.drone.star +++ b/.drone.star @@ -40,7 +40,25 @@ def testing(): 'commands': [ 'go test -race -coverprofile=coverage.txt -covermode=atomic ./...' ], - } + }, + { + 'name': 'coverage', + 'image': 'plugins/codecov', + 'settings': { + 'token': { + 'from_secret': 'codecov_token', + }, + 'files':[ + 'coverage.txt' + ], + }, + 'when': { + 'ref': [ + 'refs/heads/master', + 'refs/pull/**' + ], + }, + }, ], 'trigger': { 'ref': [ @@ -90,24 +108,6 @@ def binaries(arch): 'cd release/ && sha256sum * > sha256sum.txt', ], }, - { - 'name': 'coverage', - 'image': 'plugins/codecov', - 'settings': { - 'token': { - 'from_secret': 'codecov_token', - }, - 'files':[ - 'coverage.txt' - ], - }, - 'when': { - 'ref': [ - 'refs/heads/master', - 'refs/pull/**' - ], - }, - }, { 'name': 'publish', 'image': 'plugins/github-release', diff --git a/.drone.yml b/.drone.yml index c74813f..5fccc90 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,6 +18,18 @@ steps: commands: - go test -race -coverprofile=coverage.txt -covermode=atomic ./... +- name: coverage + image: plugins/codecov + settings: + files: + - coverage.txt + token: + from_secret: codecov_token + when: + ref: + - refs/heads/master + - refs/pull/** + trigger: ref: - refs/heads/master @@ -59,18 +71,6 @@ steps: commands: - cd release/ && sha256sum * > sha256sum.txt -- name: coverage - image: plugins/codecov - settings: - files: - - coverage.txt - token: - from_secret: codecov_token - when: - ref: - - refs/heads/master - - refs/pull/** - - name: publish image: plugins/github-release settings: @@ -130,6 +130,6 @@ depends_on: --- kind: signature -hmac: 4d47c1352ad084436acc5f2fefff9cddf87ed1d09be8e41d7e37d818b164d718 +hmac: 0f5b0278040dd5a8fa7e7794e7552063af07d127f90c15676238a2b63687dc6a ...