cedrickring / golang-action

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

Dep with vendored dependencies failing `dep check` #8

Closed dougnukem closed 5 years ago

dougnukem commented 5 years ago

When running the test case with a Go project with vendored dependencies and a Gopkg.toml/Gopkg.lock we are getting errors when the action tries to test it and runs:

https://github.com/cedrickring/golang-action/runs/74952504

# vendor is out of sync:
golang.org/x/text: hash of vendored tree not equal to digest in Gopkg.lock

### FAILED Test Go Dep Vendor 14:10:18Z (41.75s)

See notes/discussion: https://github.com/cedrickring/golang-action/issues/2#issuecomment-471216861

For now we can disable that default support in this Action until we resolve the issue.

dougnukem commented 5 years ago

I'm able to repro it locally, if I clone the git repo from inside a docker linux machine it fails, but if I mount the volume from a mac and run with act it works

$ make build
$ docker run --entrypoint "/bin/bash" -it golang-action:latest
root@ac91ce09fa49:/go#

root@ac91ce09fa49:/go# git clone https://github.com/cedrickring/golang-action.git /go/src/github.com/cedrickring/golang-action
Cloning into 'cedrickring/golang-action'...
...
root@ac91ce09fa49:/go/src/github.com# cd cedrickring/golang-action/
root@ac91ce09fa49:/go/src/github.com/cedrickring/golang-action# cd tests/projects/go_dep_vendored/
root@ac91ce09fa49:/go/src/github.com/cedrickring/golang-action/tests/projects/go_dep_vendored# dep check
# vendor is out of sync:
golang.org/x/text: hash of vendored tree not equal to digest in Gopkg.lock

The odd thing is running dep ensure I don't see any modifications, but then dep check works....