Skip to content

Commit

Permalink
Merge pull request #62 from mathworks/nightly-insiders
Browse files Browse the repository at this point in the history
test nightly on insiders version
  • Loading branch information
jdhameli authored Sep 27, 2023
2 parents 1d944cf + d4c301b commit 03ed758
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test-nightly.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
release: ${{ matrix.version }}
env:
MATHWORKS_SKIP_ACTIVATION: true
- name: Setup node
uses: actions/[email protected]
- 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"
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
7 changes: 6 additions & 1 deletion src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import * as os from 'os'
async function main (): Promise<void> {
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`
Expand Down

0 comments on commit 03ed758

Please sign in to comment.