Skip to content

test: add vt resistance workflow acceptance #318

test: add vt resistance workflow acceptance

test: add vt resistance workflow acceptance #318

Workflow file for this run

name: MATLAB Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '17 10 * * 1'
env:
MATLAB_RELEASE: R2025a
concurrency:
group: matlab-tests-${{ github.workflow }}-${{ github.event.pull_request.head.sha || github.sha }}
cancel-in-progress: true
jobs:
headless-shards:
name: ${{ matrix.label }}
runs-on: ubuntu-latest
timeout-minutes: 25
env:
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
strategy:
fail-fast: false
matrix:
include:
- label: Unit Tests - LabKit
run_name: unit-labkit
task: ciUnitLabKit
- label: Unit Tests - Apps
run_name: unit-apps
task: ciUnitApps
- label: Unit Tests - Project
run_name: unit-project
task: ciUnitProject
- label: Integration Tests - Apps
run_name: integration-apps
task: ciIntegrationApps
- label: Integration Tests - Project
run_name: integration-project
task: ciIntegrationProject
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v3
with:
release: ${{ env.MATLAB_RELEASE }}
- name: Prepare artifact directories
run: mkdir -p artifacts/logs/${{ matrix.run_name }}
- name: Run ${{ matrix.label }}
uses: matlab-actions/run-build@v3
with:
tasks: ${{ matrix.task }}
startup-options: -logfile artifacts/logs/${{ matrix.run_name }}/matlab.log
- name: Summarize ${{ matrix.label }}
if: always()
run: >
python scripts/summarize_junit.py
artifacts/test-results/${{ matrix.run_name }}/junit.xml
--run-name ${{ matrix.run_name }}
--html artifacts/test-results/${{ matrix.run_name }}/html/index.html
--log artifacts/logs/${{ matrix.run_name }}/matlab.log
- name: Upload ${{ matrix.label }} artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: matlab-${{ matrix.run_name }}
if-no-files-found: warn
retention-days: 14
path: |
artifacts/test-results/${{ matrix.run_name }}/**
artifacts/debug/${{ matrix.run_name }}/**
artifacts/logs/${{ matrix.run_name }}/**
coverage:
name: Coverage Report
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 35
env:
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v3
with:
release: ${{ env.MATLAB_RELEASE }}
- name: Prepare artifact directories
run: mkdir -p artifacts/logs/coverage
- name: Run coverage report
uses: matlab-actions/run-build@v3
with:
tasks: coverage
startup-options: -logfile artifacts/logs/coverage/matlab.log
- name: Summarize coverage test results
if: always()
run: >
python scripts/summarize_junit.py
artifacts/test-results/coverage/junit.xml
--run-name coverage
--html artifacts/test-results/coverage/html/index.html
--log artifacts/logs/coverage/matlab.log
- name: Upload coverage artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: matlab-coverage
if-no-files-found: warn
retention-days: 14
path: |
artifacts/test-results/**
artifacts/coverage/**
artifacts/debug/**
artifacts/logs/**
gui:
name: GUI Tests
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
runs-on: ubuntu-latest
timeout-minutes: 25
env:
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v3
with:
release: ${{ env.MATLAB_RELEASE }}
- name: Prepare artifact directories
run: mkdir -p artifacts/logs/gui
- name: Run GUI tests
uses: matlab-actions/run-build@v3
with:
tasks: gui
startup-options: -logfile artifacts/logs/gui/matlab.log
- name: Summarize GUI tests
if: always()
run: >
python scripts/summarize_junit.py
artifacts/test-results/gui/junit.xml
--run-name gui
--html artifacts/test-results/gui/html/index.html
--log artifacts/logs/gui/matlab.log
- name: Upload GUI artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: matlab-gui
if-no-files-found: warn
retention-days: 14
path: |
artifacts/test-results/**
artifacts/debug/**
artifacts/gui/**
artifacts/logs/**