forked from LeKovr/webtail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
27 lines (25 loc) · 842 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
kind: pipeline
name: ci
steps:
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
- git describe --tags --always > .version
- name: test app
image: ghcr.io/dopos/golang-alpine:v1.18.6-alpine3.16.2
commands:
- go test -tags test -covermode=atomic -coverprofile=coverage.txt ./...
- go vet ./...
- apk add --no-cache curl bash git
- curl -sS https://codecov.io/bash | bash
- curl -sSL https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter format-coverage coverage.txt -t gocov -p $${DRONE_REPO_LINK#https://}
- ./cc-test-reporter upload-coverage
environment:
CGO_ENABLED: 0
CODECOV_TOKEN:
from_secret: my-codecov-token
CC_TEST_REPORTER_ID:
from_secret: my-codeclimate-token