feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 143 forks source link

Improve github workflow #480

Open Miro-Andrin opened 2 years ago

Miro-Andrin commented 2 years ago

Feature Request

Modify the github workflow, such that it checks the server successfully starts when doing cargo run. Recently we had to revert a pull request. It could probably have been prevented if we had this.

Describe the solution you'd like

I don't know how we would check for a successfully start, but we could potentially use grep and search for the first occurrence of the startup message. Optionally we just run the server for 60 sec.

Miro-Andrin commented 2 years ago

@Defman could you add this oo mighty GitHub actions wizard.

Defman commented 2 years ago

This would require some --dry-run, but I suggest we just start a server in one of the test, which connects to a fake TCP port (tokio testing) throw a few packets at the server and compare against some expected packets.

In the case of Datapacks, the code can be tested as well (fs operations can be tested... might not be ideal).