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

add support for unit testing #33

Merged
merged 11 commits into from
Dec 20, 2023
Merged

add support for unit testing #33

merged 11 commits into from
Dec 20, 2023

Conversation

TheAfroOfDoom
Copy link
Owner

Summary

fixes early merge of #32

This PR adds support for .mcfunction unit tests via the packtest and packtest_runner repos. See this sample repo for another example (that was used here) to get tests to run in CI.

  • adds github workflow to run packtest
  • adds unit tests for utils:math/max and utils:math/min functions
  • updates README.md with instructions for how to install the modded client required to run tests locally
  • updates the pull request template to include a Test plan section

Reproducing in-game

test runall

Preview

see this PR's commit history and the corresponding CI statuses (❌'s and ✔️'s)


Supplemental changes

  • world sync (pre-opening world with modded client)

…it-Tools-Submodules

  - required since it's not "published" anywhere as a package, but will be receiving frequent updates
  - https://github.com/CarbonSmasher/packtest_runner
- before opening world with fabric + packtest mod
- there aren't actually any tests yet
- they will fail because `max`/`min` use `@s` currently
- convert from `@s` to fake player usage
- entirely unnecessary (:shocked_pikachu:)
@TheAfroOfDoom TheAfroOfDoom changed the title Packtest proof of concept add support for unit testing Dec 20, 2023
@TheAfroOfDoom TheAfroOfDoom merged commit b50c5f8 into main Dec 20, 2023
1 check passed
@TheAfroOfDoom TheAfroOfDoom deleted the packtest-proof-of-concept branch December 20, 2023 05:39
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

Successfully merging this pull request may close these issues.

1 participant