Skip to content

Show query CodeLens only for active query #269

Show query CodeLens only for active query

Show query CodeLens only for active query #269

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ published ]
workflow_dispatch: # Allows manual runs from GitHub Actions tab
jobs:
unit-test-server:
name: Unit Tests (Server/.NET)
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore dependencies
run: dotnet restore src/ServerTests/ServerTests.csproj
- name: Build
run: dotnet build src/ServerTests/ServerTests.csproj --no-restore --configuration Release
- name: Run tests
run: ./src/ServerTests/bin/Release/net10.0/ServerTests
unit-test-client:
name: Unit Tests (Client/TypeScript)
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: src/Client/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: src/Client
- name: Run tests
run: npm test
working-directory: src/Client
- name: Compile TypeScript
run: npm run compile
working-directory: src/Client
integration-test-client:
name: Integration Tests (VS Code)
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: src/Client/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: src/Client
- name: Cache VS Code test instance
uses: actions/cache@v4
with:
path: src/Client/.vscode-test
key: vscode-test-${{ runner.os }}-${{ hashFiles('src/Client/.vscode-test.mjs') }}
- name: Compile extension
run: npm run compile
working-directory: src/Client
- name: Run integration tests
run: xvfb-run -a npm run test:integration
working-directory: src/Client
package-vsix:
name: Build VSIX Package
runs-on: ubuntu-24.04
needs: [unit-test-server, unit-test-client, integration-test-client]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: src/Client/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: src/Client
- name: Install vsce
run: npm install -g @vscode/vsce --loglevel=error
- name: Build VSIX package
run: |
if [ "${{ github.event_name }}" = "release" ]; then
# Extract version from release tag (e.g., v1.0.0 -> 1.0.0)
VERSION="${{ github.ref_name }}"
export VERSION="${VERSION#v}"
npm run package:version
else
npm run package
fi
working-directory: src/Client
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: kusto-explorer-vsix
path: src/Client/*.vsix
retention-days: 30
- name: Upload VSIX to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: src/Client/*.vsix