test #184
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run Extension tests | |
| name: Build & Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-ubuntu: | |
| name: Build VSIX (ubuntu-latest) | |
| 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 | |
| - &ci | |
| name: Clean install dependencies | |
| run: npm ci | |
| - &package | |
| name: Package vsix | |
| run: npm run package | |
| - &install | |
| name: Install npm dependencies | |
| run: npm install | |
| - &setup | |
| name: Setup tests | |
| run: npm run test-setup | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: build-ubuntu-latest | |
| path: | | |
| *.vsix | |
| out | |
| build-windows: | |
| name: Build VSIX (windows-latest) | |
| runs-on: windows-latest | |
| steps: | |
| - *checkout | |
| - *setup-node | |
| - *ci | |
| - *package | |
| - *install | |
| - *setup | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: build-windows-latest | |
| path: | | |
| *.vsix | |
| out | |
| build-macos: | |
| name: Build VSIX (macos-13) | |
| runs-on: macos-13 | |
| steps: | |
| - *checkout | |
| - *setup-node | |
| - *ci | |
| - *package | |
| - *install | |
| - *setup | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: build-macos-13 | |
| path: | | |
| *.vsix | |
| out | |
| # SMOKE TESTS | |
| test-smoke-ubuntu: | |
| name: Smoke Test ${{ matrix.version }}-ubuntu-latest | |
| needs: build-ubuntu | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [R2021b, R2022a, R2022b, latest] | |
| steps: | |
| - *checkout | |
| - &download-ubuntu-build-artifacts | |
| name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-ubuntu-latest | |
| - &setup-MATLAB | |
| name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| release: ${{ matrix.version }} | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - 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' }} | |
| - &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 }} | |
| DISPLAY: ":17.0" | |
| - &upload-ubuntu-SS | |
| name: Upload Screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshots-ubuntu-${{ matrix.version }} | |
| path: .vscode-test/test-resources/screenshots | |
| if-no-files-found: ignore | |
| test-smoke-windows: | |
| name: Smoke Test ${{ matrix.version }}-windows-latest | |
| 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-latest | |
| - *setup-MATLAB | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - *run-smoke-tests | |
| - &upload-windows-SS | |
| name: Upload Screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshots-windows-${{ matrix.version }} | |
| path: .vscode-test/test-resources/screenshots | |
| if-no-files-found: ignore | |
| test-smoke-macos: | |
| name: Smoke Test ${{ matrix.version }}-macos-13 | |
| needs: build-macos | |
| runs-on: macos-13 | |
| 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-13 | |
| - *setup-MATLAB | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - *run-smoke-tests | |
| - &upload-macos-SS | |
| name: Upload Screenshots | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: screenshots-macos-${{ matrix.version }} | |
| path: .vscode-test/test-resources/screenshots | |
| if-no-files-found: ignore | |
| # UI TESTS | |
| test-ui-ubuntu: | |
| name: UI Test ${{ matrix.version }}-ubuntu-latest | |
| needs: build-ubuntu | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [R2021b, R2022a, R2022b, latest] | |
| steps: | |
| - *checkout | |
| - *download-ubuntu-build-artifacts | |
| - *setup-MATLAB | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - name: Run UI tests | |
| if: False | |
| 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" | |
| - *upload-ubuntu-SS | |
| test-ui-windows: | |
| name: UI Test ${{ matrix.version }}-windows-latest | |
| needs: build-windows | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [R2021b, R2022a, R2022b, latest] | |
| steps: | |
| - *checkout | |
| - *download-windows-build-artifacts | |
| - *setup-MATLAB | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - &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 }} | |
| - *upload-windows-SS | |
| test-ui-macos: | |
| name: UI Test ${{ matrix.version }}-macos-latest | |
| needs: build-macos | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [R2021b, R2022a, R2022b, latest] | |
| steps: | |
| - *checkout | |
| - *download-macos-build-artifacts | |
| - *setup-MATLAB | |
| - *setup-node | |
| - *ci | |
| - *install | |
| - *run-ui-tests | |
| - *upload-macos-SS |