Skip to content

Merge branch 'main' into dev #35

Merge branch 'main' into dev

Merge branch 'main' into dev #35

Workflow file for this run

name: MATLAB Tests and Packaging
on: [push]
jobs:
test:
name: Run MATLAB Tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up MATLAB
uses: matlab-actions/[email protected]
with:
release: R2023b
- 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
path: 'results.xml'
working-directory: 'artifacts'
reporter: java-junit
- name: Report coverage
uses: 5monkeys/cobertura-action@master
with:
path: 'artifacts/coverage.xml'
minimum_coverage: 80
report_name: Coverage Report
package:
name: Package MATLAB Toolbox
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: test
env:
VERSION: "2.2.0"
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up MATLAB
uses: matlab-actions/[email protected]
with:
release: R2023b
- name: Package toolbox
uses: matlab-actions/[email protected]
with:
tasks: package("${{ env.VERSION }}")
- name: Upload toolbox
uses: actions/upload-artifact@v4
with:
name: 'MAG Data Visualization.mltbx'
path: artifacts
if-no-files-found: error
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: v${{ env.VERSION }}
artifacts: 'artifacts/MAG Data Visualization.mltbx'
bodyFile: 'resources/ReleaseNotes.md'