Add a CI workflow for testing the extension #8
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
| name: Run VSCode Extension Tests | |
| on: | |
| push: | |
| branches: | |
| - superbol-vscode-debug | |
| pull_request: | |
| branches: | |
| - superbol-vscode-debug | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [ 20, 22, 24 ] | |
| name: Test with Node ${{ matrix.node-version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| node-version-file: 'package.json' | |
| - name: Cache VSCode test directory | |
| uses: actions/cache@v4 | |
| with: | |
| path: .vscode-test | |
| key: ${{ runner.os }}-${{ matrix.node-version }}-vscode-test-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Compile | |
| run: npm run compile | |
| - name: Run tests | |
| run: xvfb-run -a npm test | |
| if: runner.os == 'Linux' | |
| - name: Run tests | |
| run: npm test | |
| if: runner.os != 'Linux' |