diff --git a/.github/workflows/run_tests_octave.yml b/.github/workflows/run_tests_octave.yml index 5d5641b..7037e5e 100644 --- a/.github/workflows/run_tests_octave.yml +++ b/.github/workflows/run_tests_octave.yml @@ -67,7 +67,7 @@ jobs: - name: Run tests run: | octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'tests', 'utils')); savepath();" - octave $OCTFLAGS --eval "cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run tests_matlab;" + octave $OCTFLAGS --eval "cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run tests_octave;" - name: Code coverage uses: codecov/codecov-action@v4 diff --git a/.github/workflows/tests_matlab.m b/.github/workflows/tests_matlab.m index 437e1d1..21f8fb4 100644 --- a/.github/workflows/tests_matlab.m +++ b/.github/workflows/tests_matlab.m @@ -8,7 +8,6 @@ addpath(fullfile(root_dir, 'MOcov', 'MOcov')); cd(fullfile(root_dir, 'MOxUnit', 'MOxUnit')); -pwd; run moxunit_set_path(); cd(fullfile(root_dir)); diff --git a/.github/workflows/tests_octave.m b/.github/workflows/tests_octave.m new file mode 100644 index 0000000..2d2af52 --- /dev/null +++ b/.github/workflows/tests_octave.m @@ -0,0 +1,22 @@ +function tests_octave() + + % + % (C) Copyright 2024 CPP ROI developers + + root_dir = getenv('GITHUB_WORKSPACE'); + + addpath(fullfile(root_dir, 'spm12')); + addpath(fullfile(root_dir, 'lib', 'bids-matlab')); + addpath(fullfile(root_dir, 'MOcov', 'MOcov')); + + cd(fullfile(root_dir, 'MOxUnit', 'MOxUnit')); + + moxunit_set_path(); + + cd(fullfile(root_dir)); + + initCppRoi(); + + run_tests(); + +end