test #172
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: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-13] | |
| name: Build VSIX (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - &checkout | |
| name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - &node-setup | |
| name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| - name: Clean install dependencies | |
| run: npm ci | |
| - name: Package vsix | |
| run: npm run package | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Setup tests | |
| run: npm run test-setup | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: build-${{ matrix.os }} | |
| path: | | |
| *.vsix | |
| out | |
| smoke-tests: | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-13] | |
| version: [R2021b, R2022a, R2022b, latest] | |
| name: Smoke Test ${{ matrix.version }}-${{ matrix.os }} | |
| steps: | |
| - *checkout | |
| - &download-build-artifacts | |
| name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-${{ matrix.os }} | |
| - &setup-MATLAB | |
| name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| release: ${{ matrix.version }} | |
| - *node-setup | |
| - name: Clean install dependencies | |
| run: npm ci | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Run Smoke Tests | |
| run: npm run test-smoke | |
| - name: Upload Smoke Test Artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: smoke-artifacts-${{ matrix.os }}-${{ matrix.version }} | |
| path: .vscode-test/test-resources/smoke | |
| if-no-files-found: ignore | |
| ui-tests: | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-13] | |
| version: [R2021b, R2022a, R2022b, latest] | |
| name: UI Test ${{ matrix.version }}-${{ matrix.os }} | |
| steps: | |
| - *checkout | |
| - *download-build-artifacts | |
| - *setup-MATLAB | |
| - *node-setup | |
| - name: Clean install dependencies | |
| run: npm ci | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Run UI tests | |
| if: matrix.os != 'ubuntu-latest' | |
| 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 }} |