From 041ab1fd5cd554457f4802a61cc7d80de042e100 Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Thu, 12 Sep 2024 23:44:50 +0200 Subject: [PATCH 1/8] fix: make test_jokeApp a test for GitHub CI/CD --- .../tests.type.File/test_jokeApp.m.type.File.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/project/Root.type.Files/toolbox.type.File/tests.type.File/test_jokeApp.m.type.File.xml b/resources/project/Root.type.Files/toolbox.type.File/tests.type.File/test_jokeApp.m.type.File.xml index 15c5046..d8fadf3 100644 --- a/resources/project/Root.type.Files/toolbox.type.File/tests.type.File/test_jokeApp.m.type.File.xml +++ b/resources/project/Root.type.Files/toolbox.type.File/tests.type.File/test_jokeApp.m.type.File.xml @@ -1,6 +1,6 @@ - \ No newline at end of file From 0740b3c424450299efe70de8f941500f0fbf3e0d Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Thu, 12 Sep 2024 23:50:00 +0200 Subject: [PATCH 2/8] fix: don't fail fast for full test results --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 23f5400..b598ea6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,7 @@ jobs: matrix: release: [R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a] os: [ubuntu-latest, windows-latest, macos-latest] + fail-fast: false runs-on: ${{ matrix.os }} steps: - name: Check out repository From 554c034b79fb4d6165b90db054b5843610428f4b Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Fri, 13 Sep 2024 00:06:17 +0200 Subject: [PATCH 3/8] fix: start virtual frame buffer display server for linux --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b598ea6..ec5b834 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,12 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + - if: ${{ matrix.os }} == 'ubuntu-latest' + name: Start display server + run: | + sudo apt-get install xvfb + Xvfb :99 & + echo "DISPLAY=:99" >> $GITHUB_ENV - name: Set up MATLAB uses: matlab-actions/setup-matlab@v2 with: From 183c395bc7ba5a961ec68ff0303628901eac2348 Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Fri, 13 Sep 2024 00:09:18 +0200 Subject: [PATCH 4/8] fix: condition statement --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec5b834..7d6bde6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - - if: ${{ matrix.os }} == 'ubuntu-latest' + - if: ${{ matrix.os == 'ubuntu-latest' }} name: Start display server run: | sudo apt-get install xvfb From 85ed229bc68d17e053d22b1d9bab3553dfe18830 Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Fri, 13 Sep 2024 22:28:35 +0200 Subject: [PATCH 5/8] fix: try with pyvista instead --- .github/workflows/main.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d6bde6..b430b5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,12 +18,8 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - - if: ${{ matrix.os == 'ubuntu-latest' }} - name: Start display server - run: | - sudo apt-get install xvfb - Xvfb :99 & - echo "DISPLAY=:99" >> $GITHUB_ENV + - name: Setup headless display + uses: pyvista/setup-headless-display-action@v2 - name: Set up MATLAB uses: matlab-actions/setup-matlab@v2 with: From ecf747ddcdfbc3eacd5925ca9b11382e2edf361c Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Fri, 13 Sep 2024 23:02:27 +0200 Subject: [PATCH 6/8] try: does app testing work when using matlab -batch runtests? --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b430b5c..0cf2e51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,5 @@ jobs: with: release: ${{ matrix.release }} - name: Run tests - uses: matlab-actions/run-tests@v2 + run: | + matlab -batch "openProject('.'); runtests();" From d91cc65d037ef76792e1bba59ef350b9ec467209 Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Sat, 14 Sep 2024 16:46:27 +0200 Subject: [PATCH 7/8] use org runner to check app testing --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0cf2e51..1cc1cb0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,18 +12,18 @@ jobs: strategy: matrix: release: [R2021a, R2021b, R2022a, R2022b, R2023a, R2023b, R2024a] - os: [ubuntu-latest, windows-latest, macos-latest] + os: [Linux] fail-fast: false - runs-on: ${{ matrix.os }} + runs-on: + - ${{ matrix.os }} + - matlab + - self-hosted steps: - name: Check out repository uses: actions/checkout@v4 - name: Setup headless display uses: pyvista/setup-headless-display-action@v2 - - name: Set up MATLAB - uses: matlab-actions/setup-matlab@v2 - with: - release: ${{ matrix.release }} + - run: echo "/opt/MATLAB/${{ matrix.release }}/bin" >> $GITHUB_PATH - name: Run tests run: | matlab -batch "openProject('.'); runtests();" From eb7fdf0ea2e9389332f8834a7a63f6cd0587e7ee Mon Sep 17 00:00:00 2001 From: Jorik Caljouw Date: Sat, 14 Sep 2024 17:14:51 +0200 Subject: [PATCH 8/8] try with run-tests action --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1cc1cb0..713ba43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,5 +25,4 @@ jobs: uses: pyvista/setup-headless-display-action@v2 - run: echo "/opt/MATLAB/${{ matrix.release }}/bin" >> $GITHUB_PATH - name: Run tests - run: | - matlab -batch "openProject('.'); runtests();" + uses: matlab-actions/run-tests@v2