cedrickring / golang-action

A GitHub Action to run Go commands
Apache License 2.0
134 stars 33 forks source link

Add support for go modules/dep and github action go project tests #5

Closed dougnukem closed 5 years ago

dougnukem commented 5 years ago

Closes #2

Using act local github action tool you can run the tests

$ act -a "Test Go Modules"
[Test Go Modules] docker build -t golang-action:3849038 /Users/ddaniels/dev/src/github.com/cedrickring/golang-action
[Test Go Modules] docker run image=golang-action:3849038 entrypoint=[] cmd=[]
go: finding github.com/spf13/viper v1.3.1
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/spf13/cobra v0.0.3
...
ok      github.com/cedrickring/golang-action/tests/projects/go_modules  0.007s
?       github.com/cedrickring/golang-action/tests/projects/go_modules/cmd  [no test files]
dougnukem commented 5 years ago

@cedrickring yeah adding support for dep ensure makes sense if we detect the presence of a Gopkg.toml

dougnukem commented 5 years ago

@cedrickring added support and tests for Go projects that use dep (e.g. presence of a Gopkg.toml and also if the dep dependencies are vendored ->/vendor)

Also squashed the commits to cleanup the git history.

dougnukem commented 5 years ago

@cedrickring cleaned up those debug echo statements