-
Notifications
You must be signed in to change notification settings - Fork 905
Update CI to use gotestfmt for clearer test output
#3827
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: main
Are you sure you want to change the base?
Conversation
57f872e to
32387e8
Compare
4501a1a to
5ddbb37
Compare
.github/workflows/test.yml
Outdated
| - name: Docs | ||
| run: CGO_ENABLED=1 TAGS=x_benthos_extra task docs && test -z "$(git ls-files --others --modified --exclude-standard)" || { >&2 echo "Stale docs detected. This can be fixed with 'task docs'."; exit 1; } | ||
|
|
||
| - name: Install gotestfmt |
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.
Since this needs to be built I wonder could we cache it?
8659448 to
8a08b66
Compare
8a08b66 to
c75c666
Compare
taskfiles/test.yml
Outdated
| deps: | ||
| - :tools:install-gotestfmt |
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 would cause compilation on every test run. Overall it feels like the tools file needs a refactor from install-X to just X with caching. Alternatively, for simplicity, we could drop the deps.
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.
Yes it would. Alternatively we could check to see if the binary exists and if not return a message informing the user to install dependencies.
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.
Looking into this further, I've added a precondition step that will verify if gotestfmt binary is available in the bin directory, otherwise it'll return a notice informing the user to install it first.
| - ut | ||
| vars: | ||
| TIMEOUT: '{{if .CI}}5m{{else}}1m{{end}}' | ||
| preconditions: |
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 adds gotestfmt to the test output for local and CI test context and providers clearer test output, making it easier to navigate failed tests.
You can check the output out here under
Test:https://github.com/redpanda-data/connect/actions/runs/20029086927/job/57433439325?pr=3827