Skip to content

fix: preserve appended file selections #379

fix: preserve appended file selections

fix: preserve appended file selections #379

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:
name: Headless Tests
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/headless
- name: Run headless tests
uses: matlab-actions/run-build@v3
with:
tasks: headless
startup-options: -logfile artifacts/logs/headless/matlab.log
- name: Summarize headless tests
if: always()
run: |
found=0
for junit in artifacts/test-results/*/junit.xml; do
[ -f "$junit" ] || continue
found=1
run_name="$(basename "$(dirname "$junit")")"
log_path="artifacts/logs/${run_name}/matlab.log"
if [ ! -f "$log_path" ] && [ -f "artifacts/logs/headless-orchestrator/${run_name}.log" ]; then
log_path="artifacts/logs/headless-orchestrator/${run_name}.log"
fi
python scripts/summarize_junit.py "$junit" \
--run-name "$run_name" \
--html "artifacts/test-results/${run_name}/html/index.html" \
--log "$log_path"
done
if [ "$found" -eq 0 ]; then
python scripts/summarize_junit.py artifacts/test-results/headless/junit.xml \
--run-name headless \
--html artifacts/test-results/headless/html/index.html \
--log artifacts/logs/headless/matlab.log
fi
- name: Upload headless artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: matlab-headless
if-no-files-found: warn
retention-days: 14
path: |
artifacts/test-results/**
artifacts/debug/**
artifacts/logs/**
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/**