Add Drone (#1)
continuous-integration/drone/push Build is passing Details

Reviewed-on: #1
Co-authored-by: jolheiser <john.olheiser@gmail.com>
Co-committed-by: jolheiser <john.olheiser@gmail.com>
main latest
jolheiser 2021-08-09 04:30:01 +00:00
parent a701a93b81
commit 17c89d0562
No known key found for this signature in database
GPG Key ID: 454E7F878890995A
2 changed files with 43 additions and 2 deletions

41
.drone.yml 100644
View File

@ -0,0 +1,41 @@
---
kind: pipeline
name: compliance
trigger:
event:
- pull_request
steps:
- name: test
pull: always
image: golang:1.16
commands:
- go test -race ./...
- name: check
pull: always
image: golang:1.16
commands:
- go vet ./...
---
kind: pipeline
name: release
trigger:
event:
- push
branch:
- main
steps:
- name: build
pull: always
image: golang:1.16
commands:
- go build git.jojodev.com/golang/go-playground/cmd/playground
- name: gitea-release
pull: always
image: jolheiser/drone-gitea-main:latest
settings:
token:
from_secret: gitea_token
base: https://git.jojodev.com
files:
- "playground"

View File

@ -23,7 +23,7 @@ func TestShare(t *testing.T) {
t.FailNow()
}
if !strings.EqualFold(link, resp) {
if !strings.EqualFold(string(link), resp) {
t.Logf("Expected `%s` but got `%s`\n", resp, link)
t.FailNow()
}
@ -34,7 +34,7 @@ func TestShare(t *testing.T) {
t.FailNow()
}
if !strings.EqualFold(link2, "test-") {
if !strings.EqualFold(string(link2), "test-") {
t.Logf("Expected `test-` but got `%s`\n", link2)
t.FailNow()
}