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

Test execution timed out after 10m #53

Open
niravparikh05 opened this issue Mar 3, 2023 · 3 comments
Open

Test execution timed out after 10m #53

niravparikh05 opened this issue Mar 3, 2023 · 3 comments

Comments

@niravparikh05
Copy link

I have a module using go-coverage-action and tests for which generally take longer than 10m, is there anyway I can configure go test timeouts with this plugin ?

@niravparikh05
Copy link
Author

niravparikh05 commented Mar 3, 2023

looking at the code, I understand that I can pass test-args as input to the action plugin but not sure about the usage as I tried few things but it did not work.

tried passing in test-args: "[' -timeout 60m ']" which works fine with JSON.parse in general but fails with below error message in gh actions
invalid value for test-args; must be a JSON array of strings, got undefined (SyntaxError: Unexpected token ' in JSON at position 1)

may be an example on how to pass in this value would help ?

@niravparikh05
Copy link
Author

with some more digging, got the format right

  • uses: gwatts/go-coverage-action@v1
    id: coverage
    with:
    # Optional coverage threshold
    # use fail-coverage to determine what should happen below this threshold
    coverage-threshold: 50

        # Increase the test timeout
        test-args: '["-timeout 60m"]'
    

but it still fails with below error
Error: Command failed with exit code 1: go test -timeout 60m -covermode count -coverprofile /home/runner/work/_temp/go.cov ./...

although the go test commands works fine in local

@khasanovbi
Copy link
Contributor

khasanovbi commented Mar 25, 2024

@niravparikh05 try to pass '["-timeout", "60m"]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants