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

Onboarding / Howto / Readme #4

Open
BuckarooBanzay opened this issue Nov 21, 2020 · 3 comments
Open

Onboarding / Howto / Readme #4

BuckarooBanzay opened this issue Nov 21, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@BuckarooBanzay
Copy link
Contributor

This is a pretty useful project and i think lots of other minetest-modders will use it too if there's a kind
of "onboarding" / setup document that describes how to integrate mineunit into their mod and possibly also
some examples on how to set up ci/actions with it.

@BuckarooBanzay BuckarooBanzay added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 21, 2020
@S-S-X
Copy link
Owner

S-S-X commented Nov 21, 2020

#3 should probably be fixed somehow to allow easy and fast start with this.

Currently mineunit itself uses functions defined there, mostly fixture, also fixture_path.
Also fixture is not actually that accurate name for these things anymore but maybe not too far and could be used to ease migration. Things can be improved later when this things gets near version v1.0 😄 (started from v0.1 for reason).

@S-S-X
Copy link
Owner

S-S-X commented Mar 14, 2021

I think current state is good enough to begin with simple howto and Mineunit API documentation.

Documentation should contain information about:

  • Custom assertions like assert.is_Player and assert.is_ItemStack
  • Basic methods to include libraries like mineunit("core"), mineunit("server") and mineunit("player")
    • List of loadable things with simple descriptions
  • Basic methods to load sources like sourcefile("init") and sourcefile("mymod_settings")
  • Basic info about fixtures like what to do with those. Examples like fixture("testworld") and fixture("testnodes")
  • Documentation for mineunit.conf configuration file.
  • Information about fixtures/minetest.cfg Minetest configuration file.
  • Information about mod.conf and how it is used if present.
  • How to include basic copy paste workflow action to execute Mineunit tests automatically on GitHub
    name: mineunit
    on: [push, pull_request]
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@v2
        - uses: mt-mods/mineunit-actions@master
    

Probably a lot more, just listed things that came into mind right away.

@S-S-X
Copy link
Owner

S-S-X commented Oct 23, 2021

Added "Onboarding / Howto" functionality into Mineunit command itself:

  1. $ luarocks install --server=https://luarocks.org/dev mineunit: Get mineunit installed.
  2. $ cd ~/.minetest/mods/mymod: Go into your mod directory.
  3. $ mineunit --demo: Install demo spec.
    • At this point spec directory is created with some demo tests, configuration files and fixtures.
      User can inspect those to figure out what is happening.
  4. $ mineunit: Execute demo spec.
    • To see what actually happens when mineunit is executed against said demo spec.

Pull request #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants