-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.13 KB
/
Copy pathmain.yml
File metadata and controls
78 lines (67 loc) · 2.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths-ignore:
- '*.md'
- '.github/workflows/release.yml'
- 'toolbox/*.mlx'
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check-and-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repo
uses: actions/checkout@v6
- name: Cache MATLAB build files
uses: actions/cache@v5
with:
key: matlab-buildtool
path: |
.buildtool
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v3
- name: Run MATLAB build
uses: matlab-actions/run-build@v3
- name: Upload SARIF file
if: success() || failure()
uses: github/codeql-action/upload-sarif@v4
with:
# Path to SARIF file relative to the root of the repository
sarif_file: code-issues/results.sarif
# Optional category for the results
# Used to differentiate multiple results for one commit
category: matlab
- name: Upload Test Results
if: success() || failure()
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
path: testResults.xml
publish-test-results:
needs: check-and-test
runs-on: ubuntu-latest
permissions:
checks: write
# only needed unless run with comment_mode: off
pull-requests: write
if: (!cancelled())
steps:
- name: Download Test Results
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: "artifacts/**/*.xml"