From fb44a3770ab302c11db5fbc32671c0e67e79d299 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Fri, 29 May 2026 15:53:01 -0400 Subject: [PATCH 01/11] Modularize nightly and pull-request workflows --- .github/workflows/test-nightly.yml | 135 +++++++++++-- .github/workflows/test-pull-request.yml | 246 +++++++++++++++++++++--- 2 files changed, 331 insertions(+), 50 deletions(-) diff --git a/.github/workflows/test-nightly.yml b/.github/workflows/test-nightly.yml index b5b2de5..34a0d62 100644 --- a/.github/workflows/test-nightly.yml +++ b/.github/workflows/test-nightly.yml @@ -11,36 +11,135 @@ on: workflow_dispatch: jobs: - test-smoke: - name: smoke-${{ matrix.version }}-${{ matrix.os }} - runs-on: ${{ matrix.os }} + build-linux: + name: build-linux + runs-on: ubuntu-latest + steps: + - &checkout + name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - &setup-node + name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + - &install-dependencies + name: Install dependencies + run: npm run project-install-clean + - &setup-test + name: Setup tests + run: npm run test-setup + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-linux + path: out + + build-windows: + name: build-windows + runs-on: windows-latest + steps: + - *checkout + - *setup-node + - *install-dependencies + - *setup-test + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-windows + path: out + + build-macos: + name: build-macos + runs-on: macos-14 + steps: + - *checkout + - *setup-node + - *install-dependencies + - *setup-test + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-macos + path: out + + # SMOKE TESTS + test-smoke-linux: + name: Smoke Test ${{ matrix.version }}-linux + needs: build-linux + runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: [R2021b, R2022a, R2022b, latest] - os: [windows-latest, ubuntu-latest, macos-14] steps: - - name: Checkout - uses: actions/checkout@v4 + - *checkout + - &download-linux-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 with: - submodules: recursive - - name: Set up MATLAB + name: build-linux + - &setup-MATLAB + name: Set up MATLAB uses: matlab-actions/setup-matlab@v2 with: release: ${{ matrix.version }} - - name: Setup node - uses: actions/setup-node@v4 - - name: npm clean install - run: npm run project-install-clean - - name: Start Xvfb + - *setup-node + - *install-dependencies + - name: Start Xvfb run: /usr/bin/Xvfb :17 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb" shell: bash - if: ${{ success() && matrix.os == 'ubuntu-latest' }} - - name: Run tests + - &run-smoke-tests + name: Run Smoke tests run: npm run test-smoke env: MLM_WEB_LICENSE: true - MLM_WEB_ID: ${{secrets.MLM_WEB_ID}} - MLM_WEB_USER_CRED: ${{secrets.MLM_WEB_USER_CRED}} + MLM_WEB_ID: ${{ secrets.MLM_WEB_ID }} + MLM_WEB_USER_CRED: ${{ secrets.MLM_WEB_USER_CRED }} DISPLAY: ":17.0" - VSCODE_VERSION: "insider" \ No newline at end of file + VSCODE_VERSION: "insider" + + test-smoke-windows: + name: Smoke Test ${{ matrix.version }}-windows + needs: build-windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - &download-windows-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-windows + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-smoke-tests + + test-smoke-macos: + name: Smoke Test ${{ matrix.version }}-macos + needs: build-macos + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - &download-macos-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-macos + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-smoke-tests diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index cfc8be0..9ff20b2 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -8,67 +8,249 @@ on: pull_request_target: types: [ labeled ] -permissions: {} +permissions: {} jobs: - test-smoke: - name: smoke-${{ matrix.version }}-${{ matrix.os }} - runs-on: ${{ matrix.os }} + build-linux: + name: build-linux + runs-on: ubuntu-latest if: contains(github.event.pull_request.labels.*.name, 'safe to test') - strategy: - fail-fast: false - matrix: - version: [R2021b, R2022a, R2022b, latest] - os: [windows-latest, ubuntu-latest, macos-14] steps: - - name: Checkout + - &checkout + name: Checkout uses: actions/checkout@v4 with: submodules: recursive ref: "refs/pull/${{ github.event.number }}/merge" persist-credentials: false - - name: Verify Head + - &verify-head + name: Verify Head shell: bash run: | if [ "$(git ls-remote origin ${{ github.event.number }}/head | awk '{print $1}')" != "${{ github.event.pull_request.head.sha }}" ]; then echo "HEAD does not match github.event.pull_request.head.sha" exit 1 fi - - name: Set up MATLAB + - &setup-node + name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + - &install-dependencies + name: Install dependencies + run: npm run project-install-clean + - &package + name: Package vsix + run: npm run package + - *install-dependencies + - &setup-test + name: Setup tests + run: npm run test-setup + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-linux + path: | + *.vsix + out + + build-windows: + name: build-windows + runs-on: windows-latest + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - *checkout + - *verify-head + - *setup-node + - *install-dependencies + - *package + - *install-dependencies + - *setup-test + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-windows + path: | + *.vsix + out + + build-macos: + name: build-macos + runs-on: macos-14 + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - *checkout + - *verify-head + - *setup-node + - *install-dependencies + - *package + - *install-dependencies + - *setup-test + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-macos + path: | + *.vsix + out + + # SMOKE TESTS + test-smoke-linux: + name: Smoke Test ${{ matrix.version }}-linux + needs: build-linux + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - &download-linux-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-linux + - &setup-MATLAB + name: Set up MATLAB uses: matlab-actions/setup-matlab@v2 with: release: ${{ matrix.version }} - - name: Setup node - uses: actions/setup-node@v4 - - name: npm clean install - run: npm run project-install-clean - - name: Start Xvfb + - *setup-node + - *install-dependencies + - name: Start Xvfb run: /usr/bin/Xvfb :17 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb" shell: bash - if: ${{ success() && matrix.os == 'ubuntu-latest' }} - - name: Package vsix - run: npm run package - - name: npm install - run: npm run project-install - - name: Run Smoke tests + - &run-smoke-tests + name: Run Smoke tests run: npm run test-smoke env: MLM_WEB_LICENSE: true - MLM_WEB_ID: ${{secrets.MLM_WEB_ID}} - MLM_WEB_USER_CRED: ${{secrets.MLM_WEB_USER_CRED}} + MLM_WEB_ID: ${{ secrets.MLM_WEB_ID }} + MLM_WEB_USER_CRED: ${{ secrets.MLM_WEB_USER_CRED }} DISPLAY: ":17.0" - - name: Run UI tests + + test-smoke-windows: + name: Smoke Test ${{ matrix.version }}-windows + needs: build-windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - &download-windows-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-windows + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-smoke-tests + + test-smoke-macos: + name: Smoke Test ${{ matrix.version }}-macos + needs: build-macos + runs-on: macos-14 + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - &download-macos-build-artifacts + name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-macos + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-smoke-tests + + # UI TESTS + test-ui-linux: + if: False + name: UI Test ${{ matrix.version }}-linux + needs: build-linux + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - *download-linux-build-artifacts + - *setup-MATLAB + - *setup-node + - *install-dependencies + - &run-ui-tests + name: Run UI tests run: npm run test-ui env: MLM_WEB_LICENSE: true - MLM_WEB_ID: ${{secrets.MLM_WEB_ID}} - MLM_WEB_USER_CRED: ${{secrets.MLM_WEB_USER_CRED}} - DISPLAY: ":17.0" - if: ${{ success() && matrix.os != 'ubuntu-latest' }} - - name: Upload Screenshots + MLM_WEB_ID: ${{ secrets.MLM_WEB_ID }} + MLM_WEB_USER_CRED: ${{ secrets.MLM_WEB_USER_CRED }} + - name: Upload Screenshots + uses: actions/upload-artifact@v4 + if: always() + with: + name: screenshots-linux-${{ matrix.version }} + path: ${{ github.workspace }}/.s/screenshots + if-no-files-found: ignore + + test-ui-windows: + name: UI Test ${{ matrix.version }}-windows + needs: build-windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - *download-windows-build-artifacts + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-ui-tests + - name: Upload Screenshots + uses: actions/upload-artifact@v4 + if: always() + with: + name: screenshots-windows-${{ matrix.version }} + path: ${{ github.workspace }}/.s/screenshots + if-no-files-found: ignore + + test-ui-macos: + name: UI Test ${{ matrix.version }}-macos + needs: build-macos + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + version: [R2021b, R2022a, R2022b, latest] + steps: + - *checkout + - *verify-head + - *download-macos-build-artifacts + - *setup-MATLAB + - *setup-node + - *install-dependencies + - *run-ui-tests + - name: Upload Screenshots uses: actions/upload-artifact@v4 if: always() with: - name: screenshots-${{ matrix.os }}-${{ matrix.version }} + name: screenshots-macos-${{ matrix.version }} path: ${{ github.workspace }}/.s/screenshots if-no-files-found: ignore From ef8e915937969cf7d7e0e3b1bad8dd872dc6fc61 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 11:26:32 -0400 Subject: [PATCH 02/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 9ff20b2..daa625e 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request_target: + pull_request: types: [ labeled ] permissions: {} From 1bd1e06aaf5eec3d36ea49993e22dbd2514d4ee5 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 11:35:12 -0400 Subject: [PATCH 03/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index daa625e..9ff20b2 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request: + pull_request_target: types: [ labeled ] permissions: {} From dae22c58ffe82518a3277d02cfb2015619fd300a Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 11:44:50 -0400 Subject: [PATCH 04/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 9ff20b2..daa625e 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request_target: + pull_request: types: [ labeled ] permissions: {} From 68be89dba9b30b8b5b56ae9ed80248f9de2852ae Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 12:39:40 -0400 Subject: [PATCH 05/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index daa625e..65f1aab 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -208,6 +208,7 @@ jobs: if-no-files-found: ignore test-ui-windows: + if: false name: UI Test ${{ matrix.version }}-windows needs: build-windows runs-on: windows-latest @@ -232,6 +233,7 @@ jobs: if-no-files-found: ignore test-ui-macos: + if: false name: UI Test ${{ matrix.version }}-macos needs: build-macos runs-on: macos-latest From 65e97d47caa3b48508af721c2a8cc0de4cd9cf61 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 13:00:31 -0400 Subject: [PATCH 06/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 65f1aab..daa625e 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -208,7 +208,6 @@ jobs: if-no-files-found: ignore test-ui-windows: - if: false name: UI Test ${{ matrix.version }}-windows needs: build-windows runs-on: windows-latest @@ -233,7 +232,6 @@ jobs: if-no-files-found: ignore test-ui-macos: - if: false name: UI Test ${{ matrix.version }}-macos needs: build-macos runs-on: macos-latest From 19b214c861fc22715560702fd5380c5f75bc9860 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 13:14:17 -0400 Subject: [PATCH 07/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index daa625e..f7c6c62 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -209,7 +209,7 @@ jobs: test-ui-windows: name: UI Test ${{ matrix.version }}-windows - needs: build-windows + needs: [build-windows, test-smoke-windows] runs-on: windows-latest strategy: fail-fast: false @@ -233,7 +233,7 @@ jobs: test-ui-macos: name: UI Test ${{ matrix.version }}-macos - needs: build-macos + needs: [build-macos, test-smoke-macos] runs-on: macos-latest strategy: fail-fast: false From 22c623c6833d6662d5b5f400d862839b9b1b0710 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 1 Jun 2026 13:19:01 -0400 Subject: [PATCH 08/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index f7c6c62..daa625e 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -209,7 +209,7 @@ jobs: test-ui-windows: name: UI Test ${{ matrix.version }}-windows - needs: [build-windows, test-smoke-windows] + needs: build-windows runs-on: windows-latest strategy: fail-fast: false @@ -233,7 +233,7 @@ jobs: test-ui-macos: name: UI Test ${{ matrix.version }}-macos - needs: [build-macos, test-smoke-macos] + needs: build-macos runs-on: macos-latest strategy: fail-fast: false From 5e24c49a8ee92ababe5b54941c0ed8bf871fe2bb Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Tue, 2 Jun 2026 10:04:31 -0400 Subject: [PATCH 09/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index daa625e..9ff20b2 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request: + pull_request_target: types: [ labeled ] permissions: {} From 17f3def6492c156c95b2c89e3fee71f5188de727 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Mon, 15 Jun 2026 16:04:05 -0400 Subject: [PATCH 10/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index 9ff20b2..daa625e 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request_target: + pull_request: types: [ labeled ] permissions: {} From 34cd5aaae6fbff27a632efe7271e2848341e3911 Mon Sep 17 00:00:00 2001 From: Manoj Reddy Modhugula Date: Wed, 17 Jun 2026 14:30:23 -0400 Subject: [PATCH 11/11] Update test-pull-request.yml --- .github/workflows/test-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pull-request.yml b/.github/workflows/test-pull-request.yml index daa625e..9ff20b2 100644 --- a/.github/workflows/test-pull-request.yml +++ b/.github/workflows/test-pull-request.yml @@ -5,7 +5,7 @@ name: test-pull-request # Controls when the workflow will run on: # Triggers the workflow on pull requests that contain the label 'safe to test' - pull_request: + pull_request_target: types: [ labeled ] permissions: {}