-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.45 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Tests
on:
push:
branches: [main]
paths: [ 'src/**', 'tests/tests_all.m', '.github/workflows/tests.yml' ]
pull_request:
branches: [main]
paths: [ 'src/**', 'tests/tests_all.m', '.github/workflows/tests.yml' ]
env:
jobs:
tests:
runs-on: ${{ matrix.config.os }}
name: Test on ${{ matrix.config.os }} / (${{ matrix.config.moc }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, moc: 'octave'}
- {os: ubuntu-latest, moc: 'matlab'}
steps:
- name: Install Octave
if: matrix.config.moc == 'octave'
run: |
sudo apt update
sudo apt install -y octave octave-statistics
- name: Install MATLAB
if: matrix.config.moc == 'matlab'
uses: matlab-actions/setup-matlab@v2
- name: Clone MOCluGen
uses: actions/checkout@v4
- name: Install MOxUnit
uses: actions/checkout@v4
with:
repository: 'MOxUnit/MOxUnit'
path: 'MOxUnit'
- name: Run tests on Octave
if: matrix.config.moc == 'octave'
env:
MOXUNIT_PATH: ${{ github.workspace }}/MOxUnit/MOxUnit
run: octave --no-gui tests/run_headless.m
- name: Run tests on MATLAB
if: matrix.config.moc == 'matlab'
env:
MOXUNIT_PATH: ${{ github.workspace }}/MOxUnit/MOxUnit
uses: matlab-actions/run-command@v2
with:
command: tests/run_headless