E2E Self-Tests of production server and client #1700
+858
−4
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.
Implements the Gradle plumbing to install and start the production client and server straight out of the current NeoForge project.
installProductionClient
andinstallProductionServer
install into a build subdirectory. They ensure that the installer our build produces can actually be used to install a NeoForge client and server successfully.runProductionClient
andrunProductionServer
will run the client/server installed by the previous tasks. This ensures that for the client, our Launcher version manifest can be evaluated and contains all necessary libraries and arguments, while for the server, it ensures that the libraries and argument files are set up correctly.testProductionClient
andtestProductionServer
extend the previous tasks by using a small piece of "self test" code added to NeoForge itself, which is enabled by environment variables for server & client (separately). If the environment variables are set, the NeoForge code will write a marker-file and exit on the first client/server tick.The Gradle tasks then validate after the client/server exits, that the file was created. This ensures that the NeoForge server/client can successfully launch and start ticking, exposing various potential startup problems in the process (in case they do not).
If the server/client hang, the tasks will time out after five minutes.
The GH Actions pipeline was extended to run both
testProductionClient
andtestProductionServer
for all PRs and feature branches as part of the gametest workflow.