-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.13 KB
/
workflow.yml
File metadata and controls
45 lines (39 loc) · 1.13 KB
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
name: Matlab test and code coverage
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- develop
schedule:
- cron: '0 0 1,16 * *'
jobs:
matlab-test:
name: Run MATLAB Tests and Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
- name: Run tests and generate results
uses: matlab-actions/run-tests@v2
with:
source-folder: src
test-results-junit: junit.xml
code-coverage-cobertura: coverage.xml
- name: Upload coverage to Codecov
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v4
with:
file: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') && !cancelled()
uses: codecov/test-results-action@v1
with:
file: junit.xml
token: ${{ secrets.CODECOV_TOKEN }}