/moxunit-action

A Github action for Matlab or Octave unit tests

Primary LanguageShellMIT LicenseMIT

MOxUnit action

GitHub Marketplace Test codecov

This action performs unit tests for GNU Octave and Matlab using the unit testing framework MOxUnit. Documentation tests and coverage reports are supported via MOdox and MOCov.

Usage

In the simplest case

steps:
 - uses: actions/checkout@v2
 - uses: joergbrech/moxunit-action@master

runs all MOxUnit test cases found in this repository. A more complex use case could look like this:

steps:
- uses: actions/checkout@v2
- uses: joergbrech/moxunit-action@master
  with:
    tests: tests my_extra_testfile.m
    src: src thirdparty util
    with_coverage: true
    doc_tests: true
    cover_xml_file: coverage.xml
- uses: codecov/codecov-action@v1
  with:
    file: ./coverage.xml

Arguments

Input Description Usage
tests files or directories containing the MOxUnit test cases Optional, defaults to the root directory of the repo. All subdirectories are added recursively.
src directories to be added to the Octave search path before running the tests. These directories will be considered in the coverage reports, if coverage is enabled. Optional
log_file store the output in file output Optional
doc_tests set to true to run documentation tests with MOdox Optional
with_coverage set to true to record coverage using MOCov Optional
cover_xml_file store coverage XML output in file Optional
cover_html_dir store coverage HTML output in directory Optional
cover_junit_xml_file store test results in junit XML file Optional
cover_json_file store coverage report in json file for processing by coveralls.io Optional