-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
E2E Self-Tests of production server and client #1700
Conversation
Last commit published: c84dff083f36e1726bfa7481e4d346e4fa78da9d. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1700' // https://github.com/neoforged/NeoForge/pull/1700
url 'https://prmaven.neoforged.net/NeoForge/pr1700'
content {
includeModule('net.neoforged', 'neoforge')
includeModule('net.neoforged', 'testframework')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1700
cd NeoForge-pr1700
curl -L https://prmaven.neoforged.net/NeoForge/pr1700/net/neoforged/neoforge/21.3.51-beta-pr-1700-feature-e2e-selftest/mdk-pr1700.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip To test a production environment, you can download the installer from here. |
b4c92d2
to
6ba197e
Compare
buildSrc/src/main/java/net/neoforged/neodev/e2e/RunProductionClient.java
Show resolved
Hide resolved
buildSrc/src/main/java/net/neoforged/neodev/e2e/RunProductionServer.java
Show resolved
Hide resolved
🚀 This PR has been released as NeoForge version |
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.