name: VS Code Extension permissions: contents: read on: pull_request: branches: - main - "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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 1 persist-credentials: false - name: Set up Node.js uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: litellm-vscode path: vscode-extension/*.vsix if-no-files-found: error