Skip to content
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

CI idea: Check PRs and the main branch for successfully running #1197

Open
farooqkz opened this issue Aug 5, 2023 · 8 comments
Open

CI idea: Check PRs and the main branch for successfully running #1197

farooqkz opened this issue Aug 5, 2023 · 8 comments

Comments

@farooqkz
Copy link
Contributor

farooqkz commented Aug 5, 2023

We could possibly check if the code works upon launch by launching a test server(in Github Actions?)

Additionally, we could possibly check if various aspects of the game works. Not sure what is the best way for this. One way is launching a test server and connecting a test client which does somethings. Like throwing grenade to see if the grenade can be thrown without a crash. In other words, we can write test cases for the game.

@Emojigit
Copy link
Contributor

Emojigit commented Aug 6, 2023

If we really do that, we might need a way to interact with the Minetest client engine. I am thinking a hacked client, combined with a headless Xorg server, but if Minetest Engine itself can make some shared libraries for building a test client, it would be better.

@LoneWolfHT
Copy link
Member

LoneWolfHT commented Aug 10, 2023

headless clients exist, but it's not really possible for testing code to do any more than the developer just testing their code locally

@farooqkz
Copy link
Contributor Author

headless clients exist, but it's not really possible for testing code to do any more than the developer just testing their code locally

That's exactly the point. We make some common tests automatic. Therefore we can know about the PRs and the master/main branch that certain things work for sure without having to test the PRs ourselves.

@LoneWolfHT
Copy link
Member

If you make a PR you should test it. I don't want to allow bad habits to form

@farooqkz
Copy link
Contributor Author

If you make a PR you should test it. I don't want to allow bad habits to form

Yeah and if I don't test it, the merging will be blocked. As a usage example.

@LoneWolfHT
Copy link
Member

Yeah and if I don't test it, the merging will be blocked. As a usage example.

There's no point in the suggested automated testing in that case then

@farooqkz
Copy link
Contributor Author

Yeah and if I don't test it, the merging will be blocked. As a usage example.

There's no point in the suggested automated testing in that case then

I don't understand. Can you elaborate on your point? My point is that, like any other program, this game could have unit tests and use Actions+Headless client to enforce them.

@LoneWolfHT
Copy link
Member

I'd prefer to have code documentation before we start doing unit tests https://github.com/MT-CTF/capturetheflag/blob/master/docs/ctf-api.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants