question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document the fact that the golang project needs to be located at the working-directory

See original GitHub issue

Description: There is no documentation warning people that the location of the project is important as well.

Justification: Pushed to main and received this:

Error: Dependencies file is not found in /home/runner/work/user/project. Supported file pattern: go.sum

Adding the following should fix my issue, but had rather known about this beforehand

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: "1.19"
        working-directory: ./server

This does not work either

The workflow is not valid. .github/workflows/lint-v2.yml (Line: 30, Col: 9): Unexpected value 'working-directory'

Are you willing to submit a PR? Yes, If people think it is okay to do so.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
andigcommented, Sep 4, 2022

Checking in with the same problem, but without modifying the working directory:

  • as of today, received

    Error: Dependencies file is not found in /home/runner/work/evcc/evcc. Supported file pattern: go.sum
    
  • the go install is the first step, before even running checkout:

    steps:
      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: ^1.18
          cache: true
        id: go
    
      - name: Checkout
        uses: actions/checkout@v3
    
  • full log is at https://github.com/evcc-io/evcc/runs/8178666043?check_suite_focus=true

It’s unclear, why a go.sum should be necessary for even installing Go. It is also not obvious/ entirely clear if checkout needs be run before setup-go?

0reactions
e-korolevskiicommented, Nov 14, 2022

Hello @lil5

Sorry for the long waiting. At the moment, you can find information about why the location of the file and how we use it in the documentation.

I’ll close this issue for now, but if you have additional questions, you can ask them here or create a new one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to generate mocks in reflect mode · Issue #494 - GitHub
So, our modules are synced by go mod tidy && go mod vendor command. While using mockgen in a reflect mode, I'm unable...
Read more >
No required module provides package after running go get
I would: edit go.mod and remove the line where v1.2.3 is; go get github.com/gordonklaus/portaudi (executed in the project folder, ...
Read more >
How to Write Go Code - The Go Programming Language
A Go repository typically contains only one module, located at the root of the repository. A file named go.mod there declares the module...
Read more >
Go 1.18 Release Notes - The Go Programming Language
This form of go install was added in Go 1.16, so projects supporting older ... If a go.work file is found in the...
Read more >
Why does Go require a special path for projects to be on ...
Go has a list of locations to look for projects (packages) in ($GOPATH) and by default does not include the working directory. Unlike...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found