Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a vet step to drone config #83

Merged
merged 2 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
---
kind: pipeline
type: docker
name: default

workspace:
base: /go
path: src/github.com/drone/go-scm

platform:
os: linux
arch: amd64

steps:
- name: vet
image: golang:1.15
commands:
- go vet ./...
volumes:
- name: gopath
path: /go

- name: test
image: golang:1.11
image: golang:1.15
commands:
- go get github.com/google/go-cmp/cmp
- go get github.com/h2non/gock
- go test -cover github.com/drone/go-scm/scm/...
- go test -cover ./...
volumes:
- name: gopath
path: /go

volumes:
- name: gopath
temp: {}

...
8 changes: 4 additions & 4 deletions scm/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func ExampleRepository_list() {
}
}

func ExampleBranch_find() {
func ExampleGitService_FindBranch() {
client, err := github.New("https://api.github.com")
if err != nil {
log.Fatal(err)
Expand All @@ -105,7 +105,7 @@ func ExampleBranch_find() {
log.Println(branch.Name, branch.Sha)
}

func ExampleBranch_list() {
func ExampleGitService_ListBranches() {
client, err := github.New("https://api.github.com")
if err != nil {
log.Fatal(err)
Expand All @@ -126,7 +126,7 @@ func ExampleBranch_list() {
}
}

func ExampleTag_find() {
func ExampleGitService_FindTag() {
client, err := github.New("https://api.github.com")
if err != nil {
log.Fatal(err)
Expand All @@ -140,7 +140,7 @@ func ExampleTag_find() {
log.Println(tag.Name, tag.Sha)
}

func ExampleTag_list() {
func ExampleGitService_ListTags() {
client, err := github.New("https://api.github.com")
if err != nil {
log.Fatal(err)
Expand Down