fix(ci): pin maven-surefire-plugin to 3.1.2 #1276
Merged
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.
This PR pins
maven-surefire-plugin
to version3.1.2
to resolve build failures for local builds due to resolution algorithm changes in Maven 3.9.x.On GitHub Actions (and my server running Maven 3.8.7 from Debian repositories),
maven-surefire-plugin
resolves to version2.12.4
– which makes the build pass, but also seems to skip a significant portion of defined tests1.However, when building PGM locally (using Maven 3.9.1 from Fedora's repositories),
maven-surefire-plugin
is resolved to version3.0.0
(or higher), which runs all of the defined tests. Building with Maven 3.9.5 on CI runs all defined tests, skipping theTextException
class test that is otherwise failing, likely due to the JVM running using a different locale2. This makes PGM build successfully on CI under newer Maven versions.This PR also fixes a broken test of the
TextException
class which is crashing due to a missing Bukkit instance whentc.oc.pgm.util.text.Audience
is accessed by getting the emptyAudience
directly. Along with this, the test for localized messages has been improved to be environment agnostic by translating the error manually using the same steps asTextException
does and comparing the results appropriately.Footnotes
https://github.com/PGMDev/PGM/actions/runs/6867090484/job/18674723190#step:4:151 ↩
https://github.com/TTtie/PGM/actions/runs/6961974625/job/18944710722#step:6:708 ↩