Skip to content

Merge pull request #494 from VH-Lab/feature-replace-existing-dataset-doc #174

Merge pull request #494 from VH-Lab/feature-replace-existing-dataset-doc

Merge pull request #494 from VH-Lab/feature-replace-existing-dataset-doc #174

Workflow file for this run

name: Run NDI Test Suite
on:
# Triggers the workflow on push or pull request events for the "main" branch
push:
branches: [ "main" ]
paths-ignore:
- '*.md'
- '.github/**'
- 'docs/reports/**'
pull_request:
branches: [ "main" ]
paths-ignore:
- '*.md'
- '.github/workflows/**'
- 'docs/reports/**'
# Allows for manually running this workflow from the Actions tab
workflow_dispatch:
inputs:
matlab_release:
description: 'MATLAB Release'
required: false
default: 'latest'
type: choice
options:
- 'latest'
- 'R2025a'
- 'R2024b'
- 'R2024a'
- 'R2023b'
- 'R2023a'
- 'R2022b'
- 'R2022a'
- 'R2021b'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run_tests:
name: Run tests (MATLAB ${{ inputs.matlab_release || 'latest' }})
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Start virtual display server
if: runner.os == 'Linux'
run: |
sudo apt-get install -y xvfb
Xvfb :99 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ inputs.matlab_release || 'latest' }}
cache: true
- name: Install MatBox
uses: ehennestad/matbox-actions/install-matbox@v1
- name: Check code and upload report
uses: ehennestad/matbox-actions/check-code@v1
with:
source_directory: 'src'
- name: Run tests
uses: matlab-actions/run-command@v2
if: always()
with:
command: |
setenv("NDI_CLOUD_USERNAME", "${{ secrets.NDI_CLOUD_USERNAME }}")
setenv("NDI_CLOUD_PASSWORD", "${{ secrets.NDI_CLOUD_PASSWORD }}")
addpath(genpath( "src" ));
ndi.cloud.authenticate("InteractionEnabled", "off")
addpath(genpath( "tests" ));
addpath(genpath( "tools" ));
testToolbox()
- name: Restore MATLAB Path
uses: matlab-actions/run-command@v2
if: always()
with:
command: |
restoredefaultpath()
savepath()
- name: Commit SVG badges if updated
if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
uses: ehennestad/matbox-actions/push-badges@v1
with:
pr-ref: ${{ github.event.pull_request.head.ref }}
pr-repo: ${{ github.event.pull_request.head.repo.full_name }}
- name: Upload code coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: docs/reports/codecoverage.xml
# Publish test results
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "docs/reports/test-results.xml"