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

Report shows failure of previous build #21

Open
jameskleeh opened this issue Sep 16, 2020 · 6 comments
Open

Report shows failure of previous build #21

jameskleeh opened this issue Sep 16, 2020 · 6 comments

Comments

@jameskleeh
Copy link

https://github.com/micronaut-projects/micronaut-core/runs/1118820767?check_suite_focus=true

This build failed once, then was re-executed and the test report shows the old failure. All builds passed and the test-report task was skipped in all cases.

@jmisur
Copy link
Contributor

jmisur commented Sep 17, 2020

I noticed that you are not running the report if there is no failure: https://github.com/micronaut-projects/micronaut-core/blob/6e2f1d1b180ed56b31590e609503468c3e7c2490/.github/workflows/gradle.yml#L43. Maybe that's the case. Otherwise it would overwrite previous report with success.

@famod
Copy link

famod commented Mar 16, 2021

@jmisur Do you generally suggest to use always()? Thing is, I might add your awsome action to https://github.com/quarkusio/quarkus but the CI there is really heavy, with many jobs in one workflow.
I'm thinking about adding a test report only if the mvn call failed (it fails on the first test failure).

@jmisur
Copy link
Contributor

jmisur commented Mar 16, 2021

What I suggest is to decouple the test reporting from build process. So even if the build fails for any reason, you want to see the test reports (if any) anyway. So we prefer to set --fail-at-end or -Dmaven.test.failure.ignore=true to the build process itself so it doesn't stop at first failed test, but continues till the end and then report with this action. Sometimes projects are also misconfigured and no tests would run, then this action would fail because it would expect at least a single test.

@famod
Copy link

famod commented Mar 16, 2021

@jmisur Thanks for your answer. The key question I'm having whether the action must run always to have a consistent report for each run/build?

@jmisur
Copy link
Contributor

jmisur commented Mar 23, 2021

It's preferable. Otherwise you don't know if the report matches the build. But of course rerun of the same commit shouldn't change anything (unless you have flaky tests).

@nineinchnick
Copy link
Contributor

#81 should also help here

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

4 participants