Skip to content

fix: update test command in GitHub Actions to use vscode-test properly #3

fix: update test command in GitHub Actions to use vscode-test properly

fix: update test command in GitHub Actions to use vscode-test properly #3

Workflow file for this run

name: Release
on:
push:
branches:
- main
- master
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Install dependencies
run: |
# Skip scripts to avoid build issues with problematic dependencies
pnpm install --frozen-lockfile --ignore-scripts
# Then run scripts only for packages that need them, excluding the problematic one
pnpm rebuild --filter="!@vscode/test-cli"
- name: Build extension
run: pnpm run package
- name: Run tests
run: |
# Run local Node.js tests first
NODE_OPTIONS='--import=tsx' pnpm exec mocha ./src/test/language-configuration-accessibility.test.ts
# Then run VSCode extension host tests
pnpm run compile-tests
DISPLAY=:99 xvfb-run -a pnpm exec vscode-test
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: pnpm run release