diff --git a/.github/workflows/test-nightly.yml b/.github/workflows/test-nightly.yml new file mode 100644 index 0000000..6bc4151 --- /dev/null +++ b/.github/workflows/test-nightly.yml @@ -0,0 +1,47 @@ +# Run extension tests nightly on vscode insiders version + +name: test-nightly + +# Controls when the workflow will run +on: + schedule: + - cron: "45 11 * * *" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + test-smoke: + name: smoke-${{ matrix.version }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: [R2021b, R2023a] + os: [windows-latest, ubuntu-latest, macos-13] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Set up MATLAB + uses: matlab-actions/setup-matlab@v1.2.3 + with: + release: ${{ matrix.version }} + env: + MATHWORKS_SKIP_ACTIVATION: true + - name: Setup node + uses: actions/setup-node@v3.5.1 + - name: npm clean install + run: npm ci + - 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: npm run test-insiders + env: + MLM_WEB_LICENSE: true + MLM_WEB_ID: ${{secrets.MLM_WEB_ID}} + MLM_WEB_USER_CRED: ${{secrets.MLM_WEB_USER_CRED}} + DISPLAY: ":17.0" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a0bd54..21ab96b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,8 +7,6 @@ on: # Triggers the workflow on push events for the "main" branch push: branches: [ main ] - schedule: - - cron: "45 11 * * *" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/package.json b/package.json index 9bebbf8..0c43259 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,7 @@ "lint": "eslint src --ext ts", "lint:fix": "eslint src --ext ts --fix", "test": "node ./out/test/runTest.js", + "test-insiders": "node ./out/test/runTest.js --insiders", "postinstall": "cd server && npm install && cd ..", "package": "vsce package" }, diff --git a/src/test/runTest.ts b/src/test/runTest.ts index 1bf6801..208f054 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -8,7 +8,12 @@ import * as os from 'os' async function main (): Promise { try { // Run the test against minimum supported and latest stable VS Code version - const versions = ['1.67.0', 'stable'] + let versions = ['1.67.0', 'stable'] + + // If insiders argument is specified in CLI, run only against insiders version instead + if (process.argv.includes('--insiders')) { + versions = ['insiders'] + } // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath`