micropython-lib icon indicating copy to clipboard operation
micropython-lib copied to clipboard

Github Action Unit Testing

Open BrianPugh opened this issue 2 years ago • 0 comments

I recently created the github action install-micropython, making it much simpler to obtain a micropython executable in Github Actions. I can volunteer to add a workflow to run unit tests to this repo, but would like to discuss it first. There are a few issues that make the ideal implementation non-obvious.

  1. Would we simply iterate over all folders in python-stdlib (and other) and run micropython -m unittest? This has a few issues described below. An alternative is to setup an explicit job/step for each package. Advantage: much greater clarity in the github action dashboard. Disadvantage: a lot more manual configuration.

  2. Some modules are not intended to be standalone, for example (python-stdlib/os-path)

  3. Inconsistent folder structure: some packages have tests in a tests/ folder, others simply have a test_xyz.py file next to the primary library file.

  4. As a provisioning step, should unittest and unittest-discover be copied into their own directory first, then that path added to MICROPYTHONPATH?

BrianPugh avatar Jul 03 '23 17:07 BrianPugh