forked from mathworks/ci-configuration-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.56 KB
/
templateSample1.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
54
55
# This is a basic workflow to help you get started with MATLAB Actions
name: Build and test your MEX file
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ testing ]
pull_request:
branches: [ testing ]
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v1
- name: Softwares
uses: matlab-actions/run-command@v1
with:
command: ver
- name: Build MEX file using buildtool
uses: matlab-actions/run-build@v1
- name: Run all tests and generate artifacts
uses: matlab-actions/run-tests@v1
with:
source-folder: codeDesign
test-results-junit: test-results/results.xml
code-coverage-cobertura: code-coverage/coverage.xml
- name: Upload test results artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: test-restuls
path: test-results/results.xml
- name: Upload code coverage artifact
uses: actions/upload-artifact@v2
if: always()
with:
name: code-coverage
path: code-coverage/coverage.xml