Files
lgtm/.drone.yml
Renan Husson 6fe8830276 Enable & fix lint (#60)
* fix: lint

fix: lint

fix: lint

* Enable lint

* fix: add curl
2021-10-06 17:25:55 -04:00

144 lines
2.4 KiB
YAML

---
kind: pipeline
name: default
platform:
os: linux
arch: amd64
steps:
- name: test
pull: always
image: golang:1.15-alpine
commands:
- apk add --no-cache make git gcc build-base curl
- make clean
- make vet
- make lint
- make test
- make build
settings:
group: testing
environment:
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
CGO_ENABLED: 1
when:
event:
- push
- tag
- pull_request
- name: test-mysql
pull: always
image: golang:1.15-alpine
commands:
- apk add --no-cache make git gcc build-base
- make test-mysql
settings:
group: testing
when:
event:
- push
- pull_request
- name: test-pgsql
pull: always
image: golang:1.15-alpine
commands:
- apk add --no-cache make git gcc build-base
- make test-pgsql
settings:
group: testing
when:
event:
- push
- pull_request
- name: coverage
pull: default
image: plugins/codecov
environment:
CODECOV_TOKEN:
from_secret: codecov_token
when:
event:
- push
- pull_request
- name: build
pull: always
image: golang:1.15-alpine
commands:
- apk add --no-cache make git gcc build-base
- make clean build
settings:
group: release
environment:
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
GOSUMDB: sum.golang.org
CGO_ENABLED: 1
when:
branch:
- master
event:
- push
- tag
- name: docker
pull: always
image: plugins/docker:latest
settings:
group: release
repo: gitea/lgtm
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
branch:
- master
event:
- push
- name: discord
pull: default
image: appleboy/drone-discord
environment:
DISCORD_WEBHOOK_ID:
from_secret: discord_webhook_id
DISCORD_WEBHOOK_TOKEN:
from_secret: discord_webhook_token
when:
event:
- push
- tag
status:
- changed
- failure
services:
- name: mysql
pull: default
image: mysql:5.7
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
when:
event:
- push
- pull_request
- name: pgsql
pull: default
image: postgres:9.5
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: test
POSTGRES_HOST_AUTH_METHOD: trust
when:
event:
- push
- pull_request