-
Couldn't load subscription status.
- Fork 1.7k
Updated workflow to show error on failing test #2444
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
base: development
Are you sure you want to change the base?
Conversation
|
@coolwednesday @Umang01-hash can you please review this . |
@Umang01-hash @coolwednesday any updates.. |
|
@coolwednesday @Umang01-hash the example tests are failing now successfully as per the issue mentioned.. |
|
@HarK-github Thanks for the contribution — the functionality looks promising! Would you be open to taking a look at the failing test and updating the PR? Happy to help if you need any guidance along the way. |
|
@Umang01-hash Can you run the test again? |
|
Hi @HarK-github, we have re-run the pipeline, and it failed for two prior versions of go. |
|
@aryanmehrotra Hey .. How can i test the workflowpipeline myself ? right now I have to keep asking for it.. |
|
Rather than creating a PR directly on the gofr-repo, you can create a PR on your forked version's development that should also trigger the pipeline and you will have complete access there. |
|
@Umang01-hash @aryanmehrotra Issue is resolved please check . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- All the line spaces you have removed from the file go.yml should be reverted back as they provide readibility to the file and there is no use for removing them.
While i understand you changed the PORTS for KAFKA, MYSQL and REDIS in order to make the pipeline pass , can you please tell if this was really the solution or why did changing ports helped? Since already the pipeline is passing with same ports used....
|
|
|
@HarK-github The added “wait-for-services” logic is not the correct or efficient solution. It should be rejected or replaced with Docker healthchecks if—and only if—service startup timing is genuinely causing flakiness. The new waiting script introduces multiple sequential sleep loops (potentially adding 2–5 minutes to every CI run), even when all services are already healthy. GitHub Actions service containers (MySQL, Redis, Kafka) become available automatically once ports are exposed, so manual port polling is usually unnecessary. If there are rare startup race conditions, a cleaner and faster solution is to rely on Docker healthchecks, for example: This allows GitHub Actions to automatically wait until the container is healthy before running tests—without manual sleeps or custom loops. |

Title:
Fix: Ensure pipeline fails on failing example tests (#2408)
Description:
This PR fixes issue #2408, where the CI pipeline did not fail when tests in the
examples/folder failed.Previously, the test step used the
nick-fields/retry@v3action without strict failure handling, allowing the workflow to pass even when tests failed after all retries.Changes made:
Updated the “Test with Retry Logic” step in
.github/workflows/test.yml:retry_on: errorto ensure retries only occur on real failures.set -einside the command block so the job stops immediately on test failure.Confirmed
go test ./examples/...exits with a non-zero status when tests fail.Retained coverage collection and filtering steps.
Verification steps:
examples/to confirm the CI job fails as expected.Local testing:
Motivation:
This fix ensures CI integrity — failed example tests now correctly fail the pipeline, preventing false-positive builds.
Additional Notes:
Checklist
retry_on: errorandset -e.