Skip to content

Commit

Permalink
chore: test the generated .vsix file. (#2838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Sep 26, 2023
1 parent 9b56222 commit 4c23297
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,48 @@ jobs:
env:
VSCODE_VERSION: ${{ matrix.vscode-version }}
run: npm run test-client-integration

run-integration-tests-vsix:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version:
- ${{ vars.DEFAULT_NODE_VERSION }}
vscode-version: [stable]

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install
run: |
npm i
- name: Build .vsix file
run: npm run test-vsce-build

- name: Build files for testing
run: npm run build

- name: Run Linux
if: runner.os == 'Linux'
env:
VSCODE_VERSION: ${{ matrix.vscode-version }}
VSIX_LOCATION: ./temp/code-spell-checker.vsix
run: xvfb-run -a npm run test-client-integration

- name: Run Windows and MacOS
if: runner.os != 'Linux'
env:
VSCODE_VERSION: ${{ matrix.vscode-version }}
VSIX_LOCATION: ./temp/code-spell-checker.vsix
run: npm run test-client-integration
# cspell:ignore xvfb
5 changes: 5 additions & 0 deletions packages/_integrationTests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ Could not identify extension for 'vscode' require call from ...
```

These are cause because we are running the test runner from a different copy of vscode than the one use by the extension. It can be safely ignored.

## Environment Variables

- `VSIX_LOCATION` - tell the test runner to use a pre-made .vsix file.
- `VSCODE_VERSION` - tell the test runner which version of vscode to download.

0 comments on commit 4c23297

Please sign in to comment.