forked from WEC-Sim/WEC-Sim
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.27 KB
/
run-tests-main.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
name: Run MATLAB tests on main branch
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
workflow_dispatch: {}
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
release: [R2022a, R2022b, R2023a, R2023b]
name: ${{ matrix.release }} on ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Check out LFS objects
run: git lfs checkout
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.release }}
products: Simulink Simscape Simscape_Multibody
- name: Install WEC-Sim, run tests and generate artifacts
uses: matlab-actions/run-command@v2
with:
command: |
addpath(genpath('source')),
set_param(0, 'ErrorIfLoadNewModel', 'off'),
results = wecSimTest,
assertSuccess(results);
startup-options: -noFigureWindows