Skip to content

Commit e475d67

Browse files
authored
Merge pull request #124 from mathworks/123-add-ci-test-runners
123 add ci test runners
2 parents af6692f + e74b698 commit e475d67

File tree

11 files changed

+81
-0
lines changed

11 files changed

+81
-0
lines changed

.github/workflows/git-ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Widgets Toolbox Continuous Integration
2+
3+
# Controls when the workflow will run.
4+
on: [push, workflow_dispatch]
5+
# Triggers the workflow on push or pull request events
6+
# This allows the workflow run to be run manually from the Actions tab in GitHub.
7+
8+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
9+
jobs:
10+
# Run the Toolbox tests.
11+
run-tests:
12+
# Define the job strategy.
13+
strategy:
14+
# Set up the job strategy matrix to define the different job configurations.
15+
matrix:
16+
# List of platforms on which to run the tests.
17+
platform: [ubuntu-latest, windows-latest]
18+
19+
# List of MATLAB releases over which to run the tests.
20+
matlab-version: [R2023b, R2024a, R2024b]
21+
22+
# We don't define any startup options until we reach R2023b (handled separately below).
23+
# matlab-startup-options: [ '' ]
24+
25+
# Windows/Mac are supported from R2021a onwards. Ubuntu is supported from R2020b onwards.
26+
# Exclude the Windows job on R2020b.
27+
28+
# Specify the platform that the job will run on.
29+
runs-on: ${{ matrix.platform }}
30+
31+
# Don't fail the entire run if one job fails.
32+
continue-on-error: true
33+
34+
# Steps define a sequence of tasks to be executed as part of the job.
35+
steps:
36+
# Check out the repository under $GITHUB_WORKSPACE, so that the job can access it.
37+
- name: Check out the repository
38+
uses: actions/checkout@v4
39+
40+
# For Linux jobs, start a display server on the runner.
41+
- name: Start a display server for jobs running on Linux.
42+
if: ${{ matrix.platform == 'ubuntu-latest' }}
43+
run: |
44+
sudo apt-get install -y xvfb
45+
Xvfb :99 &
46+
echo "DISPLAY=:99" >> $GITHUB_ENV
47+
48+
# Set up MATLAB on the runner.
49+
- name: Set up MATLAB on the runner.
50+
uses: matlab-actions/setup-matlab@v2
51+
with:
52+
# The tests require only base MATLAB.
53+
products: MATLAB
54+
release: ${{ matrix.matlab-version }}
55+
56+
# Run the Toolbox tests.
57+
- name: Run the Toolbox tests.
58+
uses: matlab-actions/run-command@v2
59+
with:
60+
startup-options: ${{ matrix.matlab-startup-options }}
61+
command: openProject("WidgetsToolbox.prj"); [~,results] = runTestSuite(); failedTests = table(results([results.Failed])); disp(failedTests); results.assertSuccess();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="1" type="DIR_SIGNIFIER"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="workflows" type="File"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="1" type="DIR_SIGNIFIER"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info location="git-ci.yml" type="File"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Info/>

0 commit comments

Comments
 (0)