name: VS Code Extension permissions: contents: read on: pull_request: branches: - main - litellm_internal_staging - litellm_oss_staging - "litellm_**" paths: - "vscode-extension/**" - ".github/workflows/test-vscode-extension.yml" push: branches: - main paths: - "vscode-extension/**" - ".github/workflows/test-vscode-extension.yml" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: vscode-extension: runs-on: ubuntu-latest timeout-minutes: 10 defaults: run: working-directory: vscode-extension steps: - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 with: fetch-depth: 1 persist-credentials: false - name: Set up Node.js uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 with: node-version: "24" cache: npm cache-dependency-path: vscode-extension/package-lock.json - name: Install dependencies run: npm ci - name: Typecheck run: npm run typecheck - name: Unit tests run: npm test - name: Package extension run: npm run package - name: Upload VSIX uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: litellm-vscode path: vscode-extension/*.vsix if-no-files-found: error