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
build: run example tests during CI workflow #1030
base: master
Are you sure you want to change the base?
Conversation
@crazybolillo thanks for working on this. But I believe this were made redundant by the changes recently merged from #446. More specifically cc10b2a. |
That is a nice PR. I have two comments/questions
|
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.
@crazybolillo you are right, the examples were not being executed at CI. I proposed a few changes to this PR that aims to reuse the existing code to achieve the same results, PTAL.
.github/workflows/test.yml
Outdated
env: | ||
EXAMPLES_DIR: _examples | ||
run: go test -v -run='^TestBuildExamples$' |
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.
env: | |
EXAMPLES_DIR: _examples | |
run: go test -v -run='^TestBuildExamples$' | |
run: make test |
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 "normal" tests are already being run as part of the coverage, isn't it better to just run the example tests for this new step? It would make the CI faster.
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.
The suggestion for make test
was because that would also introduce -race
, which we are not doing at the moment.
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.
I see, I have changed it to make test
, however a test is failing. I will look into it to see why.
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.
Hey @crazybolillo, let's keep the previous change you had go test -v -run='^TestBuildExamples$'
.
The make test
has some intermittent issues due to the -race
. Feel free to propose a separate PR for that.
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.
Sorry for the late reply. I have gone back to just the build examples. Will see if I can create a separate PR to fix the flakiness from -race
600b767
to
390406d
Compare
059da7c
to
383b97b
Compare
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.
LGTM!
Thanks @crazybolillo! 🥇
37db86c
to
cfc0de2
Compare
Tests for examples exist, however they were not being run as part of the CI. This commit fixes it by adding a new step in the test workflow which runs said tests. Related to go-git#912.
cfc0de2
to
295dfd3
Compare
A new test has been added in order to verify that all code under
_examples is up to date and has not broken due to API changes.
This test runs as the last step of the test.yml CI workflow.
Closes #912.