Skip to content

test

test #162

Workflow file for this run

# 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: 18.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:
- name: Checkout
uses: actions/checkout@v4
- &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
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 }}