-
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....
| command: | | ||
| set -e | ||
| export APP_ENV=test | ||
| # Run tests for the examples directory with coverage |
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.
Why have we removed these comments from the workflow file. They make it easier to understand for anyone.
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.
Okay will resolve these
| grep -vE '(/client/|grpc-.+-client/main\.go|_client\.go|_gofr\.go|_grpc\.pb\.go|\.pb\.go|\.proto|health_.*\.go)' packageWithpbgo.cov > profile.cov | ||
| # Display coverage statistics | ||
| go tool cover -func profile.cov | ||
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.
Why you have removed the space between these lines?
| - name: Get dependencies | ||
| run: | | ||
| go mod download | ||
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.
This change also should be reverted..
|
|
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.