Introduce new travis beta-feature of Build Stages #330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Build Stages allow to group the build into different categories (similar to a pipeline).
I think this a feature we can make a use of since we kinda have two sets of tests. The first set of tests is the normal integration test and the second set is the matrix build that is currently performing a full integration test with various maven versions. Travis new feature of build stages pretty much helps us to group those into different categories. By default all the normal tests (
mvn clean package
) are executed in parallel. However if those tests fail it would be a waste of resources to also run the full integration tests (mvn clean install && mvn clean initialize -Pdemo
) since we already know something is broken. The build pretty much only advances to the next build stage if the current build stage has been passed and executes all tests inside the stage in parallel.Only downside is that the entire build may take a bit longer (nothing dramatic for this plugin) since the second stage is not being touched before the first one fully finished (longest job in first stage runs 1min 20s).
In general I think this should still be introduced for the fact that we use travis for free and if the build fails early during integration tests there is no reason to create another 10 jobs
Official Documentation (https://docs.travis-ci.com/user/build-stages/)