Skip to content

[REL] v0.3.0 (#725) #935

[REL] v0.3.0 (#725)

[REL] v0.3.0 (#725) #935

---
name: 'matlab: tests'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches: ['*']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
version: [R2021a, R2023a]
os: [ubuntu-latest, macos-latest, windows-latest]
test: [slow, fast]
runs-on: ${{matrix.os}}
steps:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2.2.0
with:
release: ${{matrix.version}}
- name: Clone bids-matlab
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get -y -qq update
sudo apt-get -y install unzip wget
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install bids validator
run: deno install -Agf -n bids-validator jsr:@bids/validator
- name: Install bids example
run: |
cd tests
make data
- name: Install Moxunit and MOcov
run: |
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
git clone https://github.com/MOcov/MOcov.git --depth 1
- name: Run slow tests
if: matrix.test == 'slow'
uses: matlab-actions/run-command@v2.1.1
with:
command: run MOxUnit/MOxUnit/moxunit_set_path(); addpath(fullfile(pwd, 'MOcov', 'MOcov')); global SLOW; SLOW=true; addpath(getenv('GITHUB_WORKSPACE'));
success = run_tests(); assert(success);
- name: Run fast tests
if: matrix.test == 'fast'
uses: matlab-actions/run-command@v2.1.1
with:
command: run MOxUnit/MOxUnit/moxunit_set_path(); addpath(fullfile(pwd, 'MOcov', 'MOcov')); addpath(getenv('GITHUB_WORKSPACE')); success = run_tests();
assert(success);