joergbrech / moxunit-action Goto Github PK
View Code? Open in Web Editor NEWA Github action for Matlab or Octave unit tests
License: MIT License
A Github action for Matlab or Octave unit tests
License: MIT License
Hi Jeorg,
I'm currently developing a MATLAB toolbox for importing mocap ASF and AMC files and would like to set up a really basic CI testing set using this awesome repo.
When running some really simple tests with this action, I'm getting the following error in one of my recent failed runs :
'split' undefined near line 215 column 51
LoadSkeleton>checkFileCorrect:215 (/tmp/oct-S1IzVd/LoadSkeleton.m)
FYI, in the LoadSkeleton.m file, I am simply converting a basic char array into a string under the following:
function checkFileCorrect(path)
path = string(path);
% etc.
I should note too, this script runs perfectly in MATLAB and I have had this for other MATLAB functions like convertCharToStrings(...)
I'm new to CI and deployment testing - Is this an issue with my action implementation , or is there something else going on?
Hey
Related to bids-standard/bids-matlab#108
Trying to list several ext
directories to add to the path of the MOxUnit github action give some weird results.
- name: MOxUnit Action
uses: joergbrech/moxunit-action@master
with:
tests: tests
src: +bids
ext: JSONio tests/utils # < ------ External resources to add to the search put (excluded from coverage)
with_coverage: true
cover_xml_file: coverage.xml
This fails:
https://github.com/bids-standard/bids-matlab/pull/108/checks?check_run_id=1694214979
The setup phase of the action gives this (amongst other things):
addpath(genpath("/github/workspace/JSONio tests/utils"));
I think I would have assumed that the set up phase would do something like this.
addpath(genpath("/github/workspace/JSONio"));
addpath(genpath("/github/workspace/tests/utils"));
Am I correct in my expectations?
I am getting some strange reports from codecov from the output from the moxunit-action.
My tests passes, the coverage differences show some changes, but it still tells me I am hitting 0 lines.
See here: bids-standard/bids-matlab#124 (comment)
I could take it up with codecov but I would like to make sure it does not come from moxunit action or moxunit first.
Any idea or pointer?
Per discussion on #20, would it be possible to have moxunit-action support a pre-test initialization hook, where one could point to an arbitrary pre-test file to run? (presumably some might also want a post-test hook)
This would then be more symmetric with the pattern suggested in MOxUnit
Hi, I am having odd results in the coverage report generated using moxunit-action. My final goal is to get it working for the ONSAS.m but I created a much simpler repo to reproduce the errors and explain better.
I created this minimal repo where this simple test script is run https://github.com/jorgepz/Octave_Matlab_CI_Testbed/blob/master/test/moxunit_testWithCoverage.m the process goes well, both tests are executed and passed https://github.com/jorgepz/Octave_Matlab_CI_Testbed/actions/runs/4252541995/jobs/7396264753 but for some reason the coverage report show only part of the file executions of the last test https://app.codecov.io/gh/jorgepz/Octave_Matlab_CI_Testbed . This is the same behavior that i am seeing in the ONSAS repo.
I am aware that this could be a MOcov issue, but I was not able to run it locally yet.
Thanks in advance
Hello, I've been using moxunit and it has been so useful that I am now trying to add code coverage!
I did some tests in https://github.com/jorgepz/Octave_Matlab_CI_Testbed and I think I got how it works.
However, in the ONSAS.m repo I am having a get_coverage_writers_collection
error that could not solve ONSAS/ONSAS.m#435
Could you please help me indicating a hint on where the error could be?
Thanks
Hey
Related to bids-standard/bids-matlab#108
Trying to list several ext
directories to add to the path of the MOxUnit github action give some weird results.
- name: MOxUnit Action
uses: joergbrech/moxunit-action@master
with:
tests: tests
src: +bids
ext: JSONio tests/utils # < ------ External resources to add to the search put (excluded from coverage)
with_coverage: true
cover_xml_file: coverage.xml
This fails:
https://github.com/bids-standard/bids-matlab/pull/108/checks?check_run_id=1694214979
The setup phase of the action gives this (amongst other things):
addpath(genpath("/github/workspace/JSONio tests/utils"));
I think I would have assumed that the set up phase would do something like this.
addpath(genpath("/github/workspace/JSONio"));
addpath(genpath("/github/workspace/tests/utils"));
Am I correct in my expectations?
It looks like there's an error when running entrypoint.sh
:
/entrypoint.sh: 28: [: code: unexpected operator
Originally posted by @jakebeal in #20 (comment)
The problem is that the entrypoint is executing bash commands using the #/bin/sh -l
shebang.
Thanks @jakebeal for the find!
@joergbrech I will soon upgrade the Octave version to 5.2.0 (Ubuntu 20.04 based) in the Docker images I built for our software. Currently we are pulling from qmrlab/octaveci:v4.2.2
, I can update this to the new one if you agree.
Best!
This can be done automatically with https://github.com/marketplace/actions/update-major-version
See discussion in #15
I'd been using MOxUnit successfully for a long time with another build system, and when I needed to migrate to GitHub Actions, I figured I would use this system. I'm having difficulty, however, because my tests use some large data files that are in another repository. I can get both repositories checked out, but moxunit-action appears to run in a fixed location, and thus I'm not able to run on GitHub actions using the same relative directory convention that has worked for me in the past, since the location where it runs is unrelated to the location where checkouts occur.
Sometimes tests reference relative paths that are not necessarily relative to the github workspace, see #20.
I once in a while run into failures that I can't reproduce locally, on either Matlab, octave 4 or 5.
For example the following code fails with that error in CI (details below):
subject.(modality) = [subject.(modality), p]
failure: octave_base_value::convert_to_str_internal (): wrong type argument 'scalar struct'
append_to_layout:52 (/github/workspace/+bids/+internal/append_to_layout.m)
https://github.com/bids-standard/bids-matlab/pull/124/checks?check_run_id=1902345529
I am trying to figure out what is going on but this becoming a bit of a headache. Any idea?
>> subject.(modality)
ans =
0×0 empty struct array with no fields.
>> p
p =
struct with fields:
filename: 'sub-16_ses-mri_run-1_acq-hd_T1w.nii.gz'
ext: '.nii.gz'
suffix: 'T1w'
entities: [1×1 struct]
>> subject.(modality) = [subject.(modality), p]
subject =
struct with fields:
anat: [1×1 struct]
Would it be possible to bump the octave version and maybe not depend on qmrilab image for the base build?
Maybe from spm12 docker image? Because the Docker recipe is available
https://github.com/spm/spm-docker
docker pull ghcr.io/spm/spm-docker:docker-octave
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.