-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add a separate pipeline for integration tests if integration/*.go
exists
#578
Add a separate pipeline for integration tests if integration/*.go
exists
#578
Conversation
I'm mixed about how I feel about this. Adding these tools won't break anything, but the tests are something that run often and the install create-package step, in particular, takes 10-15s to run (because it's doing a go build and downloading stuff). So that's an additional 10-15s on every test run for a tool that's not used most of the time. Cleaning up the Right now, we add jobs for "Unit Test" and "Create Package Test".
I think we should probably add integration tests as a separate I would also caution about using integration tests, as I mentioned on Slack. Use unit tests to cover as much functionality as possible, and have as small a set of integration tests as possible. They will be slow. Count on 45-60s per integration test. They are going to run on every PR submitted and after every PR is merged, so that can slow down how efficiently you can merge commits (think about when a new version is cut and we have a bunch of PRs to merge for new dependencies). There are some things you can do to speed up Java integration style tests, we've gotten some of our samples to run in as little as 20-30s. See this commit and this commit which have details about what we did. Basically, we cache the host maven/gradle repo and volume map it into containers so that each build doesn't have to download all the Maven stuff every time. |
Adding a new optional "Integration Test" job would work well for me, I could configure it based on the presence of an |
It looks like the pattern the other Paketo projects are using is to have an |
@dmikusa-pivotal do you think this needs an rfc? It won't take me long to draft one |
I would say no. IMHO, this is internal project details. The RFC would be for more public facing interfaces that we want to guarantee across the project. |
ok thanks, I'll get this PR adjusted in the morning to try and handle 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.
There is also a conflict on the statik.go file. You will probably need to rebase your branch on main & then re-run the go generate
to update that. Sorry about that, I had to merge something for our release this week.
Aside from that and my question about -short
this all looks good.
46ce39e
to
8d4b08c
Compare
integration/*.go
exists
8d4b08c
to
712dcb6
Compare
712dcb6
to
74fe9d2
Compare
Thanks for this! |
Summary
Add a separate pipeline for integration tests if
integration/*.go
exists.If this directory does not exist, or does not contain go files then no changes will be applied.
If this directory does exist and contains go files, an
Integration Test
pipeline will be added. Unit tests will be updated to run with the-short
flag so we can avoid running integration tests as part of the unit test pipeline.Use Cases
I'd like to be able to integration test my buildpack and provide feedback on each PR.
Checklist