-
Notifications
You must be signed in to change notification settings - Fork 63
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
Failing unit tests does not abort the action #119
Comments
Unfortunately, still not fixed: https://github.com/ccremer/znapzend-exporter/runs/484538939 |
Same error. My coverage file is generated successfully but I received this error because the coverageLocation was empty.
However, the whole action still reported a successful exit so there was no indication that anything was wrong :( run: https://github.com/testdouble/scripty/runs/543450243?check_suite_focus=true |
Apologies, but I still haven’t been able to root-cause this properly. Would you mind running the latest version and reporting back? |
I'm running 2.5.6 |
If anyone needs a working solution, I moved the test command (with coverage generation) outside of this action in the meantime (in - name: Test & Publish Code Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: asdf
with:
coverageCommand: true
prefix: (go repo name) |
The 2.5.0 version still has some problems: I don't get the right Branch name and Commit SHA in CodeClimate, if it is getting triggered by a pull request. I see the problem with the in 2.5.5, but just the branch name, I still have problems with the commit sha. |
@jasonkarns can you test something and add the coverageLocations to the github actions workflow file, this fixes the issue for my test repository I think see this example |
@markkevans Thanks for the workaround. If it indeed works, then it might give me a clue about the issue. @andreipislariu @ccremer @jasonkarns Can you folks confirm that this workaround works? |
With 2.5.6 it gets interesting. Previously an unsuccessful run continued. Now it's the opposite: A successful test runs but fails to format The workaround with specifying coverageLocations works, also for a failing unit test In the previous comment, it also seems to be an issue in the format step /home/runner/work/scripty/scripty/cc-reporter format-coverage [] -t undefined -o codeclimate.0.json
Error: could not find a formatter of type undefined
...
(node:2717) UnhandledPromiseRejectionWarning: TypeError: (s || "").replace is not a function |
@markkevans @andreipislariu @ccremer @jasonkarns I've finally root-caused the issue and fixed it! Can you folks test EDIT: Please hold off on using it as I'm validating it currently again a hobby project of mine. EDIT 2: Should work now! phew |
…i/codeclimate-action#119" This reverts commit 8214099. Because I think paambaati/codeclimate-action@473bbba might have *FINALLY* *ACTUALLY* fixed the damn issue.
With 2.5.7 now something else broke again... https://github.com/ccremer/znapzend-exporter/runs/597634507?check_suite_focus=true: - name: Test & Publish Code Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ...
with:
coverageCommand: go test -coverprofile c.out ./...
prefix: znapzend-exporter
|
@ccremer Can you configure your job to include the |
Update: it seems the coverageLocation parameter is now mandatory, then it works:
|
@ccremer Can you link me to both the runs with the additional flags turned on (see #119 (comment))? |
Run with Debug, without coverageLocations: https://github.com/ccremer/znapzend-exporter/runs/597644995?check_suite_focus=true |
A failing unit test stops the action, so thats good so far: https://github.com/ccremer/znapzend-exporter/runs/597650813?check_suite_focus=true |
I was wondering why my unit tests seemingly passed, but no coverage report was generated.
I noticed in the job logs that my unit tests failed, but the action continued, making it seem that the check passed. But there's an error that gets ignored:
See here: https://github.com/ccremer/znapzend-exporter/runs/475913996?check_suite_focus=true
For now, I'll have to run the unit tests twice I guess, so the job gets properly aborted.
The text was updated successfully, but these errors were encountered: