chore: add ci test clients. (#476)
* chore: add ci test clients. * chore: add ci test build intellij plugin.release-0.2
parent
807bcb3927
commit
e5340ddf06
|
|
@ -0,0 +1,30 @@
|
||||||
|
name: Test IntelliJ Plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/intellij-test.yml'
|
||||||
|
- 'clients/intellij/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/intellij-test.yml'
|
||||||
|
- 'clients/intellij/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: zulu
|
||||||
|
java-version: 17
|
||||||
|
- name: Test Build
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
arguments: buildPlugin
|
||||||
|
build-root-directory: clients/intellij
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
name: Test tabby-agent
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/tabby-agent-test.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- 'clients/tabby-agent/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/tabby-agent-test.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- 'clients/tabby-agent/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '18.x'
|
||||||
|
cache: yarn
|
||||||
|
cache-dependency-path: 'yarn.lock'
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ./clients/tabby-agent
|
||||||
|
run: yarn install
|
||||||
|
- name: Lint
|
||||||
|
working-directory: ./clients/tabby-agent
|
||||||
|
run: yarn lint:check
|
||||||
|
- name: Run tests
|
||||||
|
working-directory: ./clients/tabby-agent
|
||||||
|
run: yarn test
|
||||||
|
- name: Test build
|
||||||
|
working-directory: ./clients/tabby-agent
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Test VSCode Extension
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/vscode-test.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- 'clients/tabby-agent/**'
|
||||||
|
- 'clients/vscode/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/vscode-test.yml'
|
||||||
|
- 'package.json'
|
||||||
|
- 'yarn.lock'
|
||||||
|
- 'clients/tabby-agent/**'
|
||||||
|
- 'clients/vscode/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '18.x'
|
||||||
|
cache: yarn
|
||||||
|
cache-dependency-path: 'yarn.lock'
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: ./clients/vscode
|
||||||
|
run: yarn install
|
||||||
|
- name: Lint
|
||||||
|
working-directory: ./clients/vscode
|
||||||
|
run: yarn lint:check
|
||||||
|
- name: Test build
|
||||||
|
working-directory: ./clients/vscode
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
|
@ -10,9 +10,10 @@
|
||||||
"openapi-codegen": "openapi-typescript ./openapi/tabby.json -o ./src/types/tabbyApi.d.ts",
|
"openapi-codegen": "openapi-typescript ./openapi/tabby.json -o ./src/types/tabbyApi.d.ts",
|
||||||
"dev": "tsup --watch --no-minify --no-treeshake",
|
"dev": "tsup --watch --no-minify --no-treeshake",
|
||||||
"build": "tsup",
|
"build": "tsup",
|
||||||
"test:watch": "env TEST_LOG_DEBUG=1 mocha --watch",
|
|
||||||
"test": "mocha",
|
"test": "mocha",
|
||||||
"lint": "prettier --write ."
|
"test:watch": "env TEST_LOG_DEBUG=1 mocha --watch",
|
||||||
|
"lint": "prettier --write .",
|
||||||
|
"lint:check": "prettier --check ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chai": "^4.3.5",
|
"@types/chai": "^4.3.5",
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export class CompletionProviderStats {
|
||||||
this.completionRequestTimeoutCount = 0;
|
this.completionRequestTimeoutCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetWindowed() {
|
resetWindowed() {
|
||||||
this.recentCompletionRequestLatencies = new Windowed(10);
|
this.recentCompletionRequestLatencies = new Windowed(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -191,6 +191,7 @@
|
||||||
"dev": "code --extensionDevelopmentPath=$PWD --disable-extensions && yarn watch",
|
"dev": "code --extensionDevelopmentPath=$PWD --disable-extensions && yarn watch",
|
||||||
"dev:browser": "vscode-test-web --extensionDevelopmentPath=$PWD --browserType=chromium --port=3000 && yarn watch",
|
"dev:browser": "vscode-test-web --extensionDevelopmentPath=$PWD --browserType=chromium --port=3000 && yarn watch",
|
||||||
"lint": "prettier --write .",
|
"lint": "prettier --write .",
|
||||||
|
"lint:check": "prettier --check .",
|
||||||
"vscode:prepackage": "yarn build",
|
"vscode:prepackage": "yarn build",
|
||||||
"vscode:package": "vsce package --no-dependencies",
|
"vscode:package": "vsce package --no-dependencies",
|
||||||
"vscode:prepublish": "yarn build",
|
"vscode:prepublish": "yarn build",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue