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

Create test suite #429

Open
jwulf opened this issue Jan 28, 2020 · 3 comments
Open

Create test suite #429

jwulf opened this issue Jan 28, 2020 · 3 comments

Comments

@jwulf
Copy link
Contributor

jwulf commented Jan 28, 2020

The current CI has no tests in it.

I got Jasmine working in Minecraft and use it to unit test the Magikcraft plugins that are built on top of ScriptCraft (example). I also have this working with Nukkit to test our code on Minecraft PE.

It should be possible to layer the SMA image and build different ones with various server combinations, such as Paper 1.14 / 1.15 / 1.15.2, Spigot 1.14 / 1.15 / 1.15.2 etc, Nukkit and write unit tests for ScriptCraft. That way we can know to some degree what combinations are working, and detect when things break and how effective our fixes are.

It's worth it for me to invest some time in doing this, to get it working generally and for the specific version combinations that I am targeting, because ScriptCraft is upstream for Magikcraft - and if I do the work upstream other people can leverage it to add test configs for the combinations that they are using.

@jwulf
Copy link
Contributor Author

jwulf commented Jan 28, 2020

I can't get Travis working on the @Magikcraft org without paying for a Travis account it seems, so I'll see if I can automate my own tests with GitHub actions, then see if I can do it with our ScriptCraft fork.

@jwulf
Copy link
Contributor Author

jwulf commented Jan 28, 2020

Looks promising...
Screen Shot 2020-01-28 at 3 00 37 am

@jwulf
Copy link
Contributor Author

jwulf commented Jan 28, 2020

Got it working. I followed this: https://medium.com/8fit-tech-blog/github-actions-running-javascript-unit-tests-on-docker-20e2426ddc1

Tomorrow I'll get it working in the Magikcraft fork of ScriptCraft. First I will get the Travis build as a GitHub action and PR that in. we'll need that, because we need the built artifacts to run tests on.

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

No branches or pull requests

1 participant