generated from Remi-Gau/template_matlab_analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.35 KB
/
matlab_test_and_coverage.yaml
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
54
55
56
57
58
59
60
61
62
---
name: 'MATLAB: test and coverage'
# Installs
# - MATLAB
# - MOXunit
# - MOcov
# run .github/workflows/tests_matlab.m
# If tests pass, uploads coverage to codecov
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
- dev
pull_request:
branches:
- '*'
jobs:
matlab_tests:
strategy:
matrix:
version: [R2021a, R2021b, R2022a, R2022b, R2023a]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Install MAT
uses: matlab-actions/setup-matlab@v1.2.4
with:
release: ${{ matrix.version }}
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- 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 tests
uses: matlab-actions/run-command@v1.2.1
with:
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run run_tests_ci;
- name: Code coverage
uses: codecov/codecov-action@v3
with:
file: coverage.xml
flags: ${{ matrix.os }}_matlab-${{ matrix.version }}
name: codecov-umbrella
fail_ci_if_error: true