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 -- UNMERGED #32

Merged
merged 10 commits into from
Dec 20, 2023

Conversation

TheAfroOfDoom
Copy link
Owner

@TheAfroOfDoom TheAfroOfDoom commented Dec 20, 2023

Summary

moved to #33 after unmerging due to missing a commit

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 merged commit fd15240 into main Dec 20, 2023
1 check passed
@TheAfroOfDoom TheAfroOfDoom deleted the packtest-proof-of-concept branch December 20, 2023 05:32
@TheAfroOfDoom TheAfroOfDoom restored the packtest-proof-of-concept branch December 20, 2023 05:32
@TheAfroOfDoom
Copy link
Owner Author

forgot to push commit with README change

@TheAfroOfDoom
Copy link
Owner Author

moved to #33

@TheAfroOfDoom TheAfroOfDoom changed the title add support for unit testing add support for unit testing -- UNMERGED Dec 20, 2023
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