Skip to content

fix: responsiveness of Vscode extension #58

fix: responsiveness of Vscode extension

fix: responsiveness of Vscode extension #58

Workflow file for this run

name: Node.js Build
on:
pull_request:
branches:
- main
jobs:
package:
name: Package
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x64, arm64] # Define the architectures
steps:
- uses: actions/checkout@v3
# Set up Node.js environment for the appropriate Node.js version
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
# Install npm dependencies based on the architecture
- name: Install dependencies
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
npm_config_arch=arm64 npm install --build-from-source
else
npm_config_arch=x64 npm install --build-from-source
fi
# Run Rollup for compilation (adjust this as necessary for your project)
- name: Run Rollup
run: npm run rollupci
# List contents of the compiled directory for debugging
- name: List contents of out/compiled directory
run: ls -R out/compiled
# Install vsce for packaging the extension
- name: Install vsce
run: npm install -g @vscode/vsce
# Set up the package path using environment variables
- name: Setup package path
id: setup
run: |
packageName=$(node -e "console.log(require('./package.json').name + '-' + require('./package.json').version + '-${{ matrix.arch }}.vsix')")
echo "PACKAGE_NAME=$packageName" >> $GITHUB_ENV
# Package the extension with dynamic targets based on architecture
- name: Package Extension
run: |
vsce package --target ${{ matrix.arch == 'arm64' && 'linux-arm64 --target darwin-arm64 --target win32-arm64' || 'linux-x64 --target darwin-x64 --target win32-x64' }} --out out/compiled/extension-${{ matrix.arch }}.vsix
# List the generated VSIX file for debugging purposes
- name: List packaged VSIX
run: ls -lh $VSIX_PACKAGE_PATH
- run: xvfb-run -a npm test
if: runner.os == 'Linux'