Skip to content

Fixed YAML

Fixed YAML #2

Workflow file for this run

name: Test Framework Extensions CI
on:
push:
branches: [main]
tags:
- 'v*'
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
env:
DOCMAKER_GITHUB_TOKEN: ${{ secrets.DOCMAKER_GITHUB_TOKEN }}
jobs:
run-tests:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest]
matlab-version: [R2023b, R2024b, R2025b, R2026a]
runs-on: ${{ matrix.platform }}
continue-on-error: false
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Start a display server for jobs running on Linux
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Set up MATLAB on the runner
uses: matlab-actions/setup-matlab@v2
with:
products: |
MATLAB
Simulink
Parallel_Computing_Toolbox
release: ${{ matrix.matlab-version }}
- name: Run the toolbox tests
uses: matlab-actions/run-tests@v2
package-and-release-toolbox:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Extract version from tag
shell: bash
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Extract release notes
shell: bash
id: extract_notes
run: |
TAG_NAME="${GITHUB_REF#refs/tags/v}"
awk "/^## Version $TAG_NAME\$/ {flag=1; next} /^## Version / {flag=0} flag" tbx/testextdoc/changelog.md > RELEASE_NOTES.md
sed -i ':a;/^\n*$/{$d;N;ba}' RELEASE_NOTES.md
echo "notes<<EOF" >> $GITHUB_OUTPUT
cat RELEASE_NOTES.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Set up MATLAB on the runner
uses: matlab-actions/setup-matlab@v2
with:
products: MATLAB
release: R2026a
- name: Download and Install DocMaker
uses: matlab-actions/run-command@v2
with:
command: |
toolboxFile = websave( "MATLAB_DocMaker.mltbx", "https://github.com/mathworks/docmaker/releases/latest/download/MATLAB_DocMaker.mltbx" );
fileCleanup = onCleanup( @() delete( toolboxFile ) );
matlab.addons.install( toolboxFile, true );
- name: Package toolbox
uses: matlab-actions/run-build@v2
with:
tasks: package
build-options: -skip test -skip check
- name: Release toolbox
uses: softprops/action-gh-release@v2
with:
name: Test Framework Extensions ${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
body: ${{ steps.extract_notes.outputs.notes }}
draft: false
make_latest: true
files: releases/TestFrameworkExtensions.mltbx