Skip to content

Merge pull request #120 from ImperialCollegeLondon/dependabot/github_… #155

Merge pull request #120 from ImperialCollegeLondon/dependabot/github_…

Merge pull request #120 from ImperialCollegeLondon/dependabot/github_… #155

Workflow file for this run

name: MATLAB Tests
on: [push, pull_request, workflow_call]
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run MATLAB Tests
strategy:
matrix:
release: ["R2024a", "R2024b"]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up MATLAB
uses: matlab-actions/[email protected]
with:
release: ${{ matrix.release }}
products: MATLAB_Test Signal_Processing_Toolbox Statistics_and_Machine_Learning_Toolbox Text_Analytics_Toolbox
- name: Download CDF support package
uses: robinraju/[email protected]
with:
repository: ImperialCollegeLondon/MATLAB-SPDF-CDF
tag: v3.9.0
fileName: MATLAB.SPDF.CDF.mltbx
token: ${{ secrets.MATLAB_SUPPORT_PACKAGES_TOKEN }}
tarBall: false
zipBall: false
- name: Download SPICE support package
uses: robinraju/[email protected]
with:
repository: ImperialCollegeLondon/MATLAB-SPICE
tag: N0067
fileName: MATLAB.SPICE.MICE.mltbx
token: ${{ secrets.MATLAB_SUPPORT_PACKAGES_TOKEN }}
tarBall: false
zipBall: false
- name: Install support packages
uses: matlab-actions/[email protected]
with:
command: "matlab.addons.install('MATLAB.SPDF.CDF.mltbx'); matlab.addons.install('MATLAB.SPICE.MICE.mltbx');"
- name: Run tests
uses: matlab-actions/[email protected]
with:
tasks: check test
- name: Report results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: MATLAB Test Results (${{ matrix.release }})
path: 'results.xml'
working-directory: 'artifacts'
reporter: java-junit
- name: Report coverage
uses: 5monkeys/cobertura-action@master
if: matrix.release == 'R2024b'
with:
path: 'artifacts/coverage.xml'
minimum_coverage: 80
skip_covered: true
report_name: Coverage Report (${{ matrix.release }})