Skip to content

Commit

Permalink
Simplify Octave unit test commands in build.yml
Browse files Browse the repository at this point in the history
Streamlined the Octave unit test commands in the `build.yml` file for both Linux and Windows environments. The changes involve using more concise conditional statements directly within the `octave --eval` command to check if the tests pass and exit accordingly. This reduces the complexity of the conditional checks and enhances readability.
  • Loading branch information
ptahmose committed Oct 19, 2024
1 parent 1c7fd52 commit 6fbe9dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ jobs:
shell: bash
run: |
cd tests/octave
octave --eval "addpath('../../OctaveMex'),result=test('test_basic_operation.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
octave --eval "addpath('../../OctaveMex'),result=test('test_write.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
octave --eval "addpath('../../OctaveMex'),if test('test_basic_operation.m'), exit(0); else, exit(1); end"
octave --eval "addpath('../../OctaveMex'),if test('test_write.m'), exit(0); else, exit(1); end"
- name: Octave Unit-Tests (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
cd tests/octave
set GITHUB_WORKSPACE_FORWARD_SLASHES=%GITHUB_WORKSPACE:\=/%
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),result=test('test_basic_operation.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),result=test('test_write.m'); if ~all([result.passed]), exit(1); else, exit(0); end"
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),if test('test_basic_operation.m'), exit(0); else, exit(1); end"
"%OCTAVECLI_LINK%" --eval "cd %GITHUB_WORKSPACE_FORWARD_SLASHES%/tests/octave,addpath('../../OctaveMex'),if test('test_write.m'), exit(0); else, exit(1); end"
- name: Prepare MATLAB-mex artifact (Windows)
id: prepare_windows_matlab_artifact
if: runner.os == 'Windows'
Expand Down

0 comments on commit 6fbe9dd

Please sign in to comment.