Skip to content

Apply suggestions from code review #1248

Apply suggestions from code review

Apply suggestions from code review #1248

Workflow file for this run

name: matlab
on:
push:
pull_request:
branches:
- main
workflow_call:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
Matlab-Unit-Tests:
runs-on: ${{ matrix.os }}
env:
TEST_ECAT_PATH: ${{ github.workspace }}/ecat_validation/synthetic_ecat_integer.v.gz
MATLAB_CODE_PATH: ${{ github.workspace }}/matlab/
METADATA_PATH: ${{ github.workspace }}/metadata/
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Debug
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
timeout-minutes: 15
with:
limit-access-to-actor: true
# matlab not supported on MacOS!! at this time
- name: Perform setup-matlab
uses: matlab-actions/setup-matlab@v1
if: matrix.os == 'ubuntu-latest'
# Again only running this on ubuntu
- name: Add Matlab Code Folder to Path and Run Tests
uses: matlab-actions/run-command@v1
with:
command: |
addpath('${{ env.MATLAB_CODE_PATH }}');
addpath('${{ env.MATLAB_CODE_PATH }}/unit_tests');
addpath('${{ env.MATLAB_CODE_PATH }}/template_txt');
addpath('${{ env.TEST_ECAT_PATH }}');
addpath('${{ env.METADATA_PATH }}');
ecat2nii_test
if: matrix.os == 'ubuntu-latest'