Merge pull request #2046 from continuedev/nate/fix-ci-tests
Fixes CI tests by installing vectordb
This commit is contained in:
commit
f3a0a1fe7d
13 changed files with 52 additions and 46 deletions
4
.github/workflows/README.md
vendored
4
.github/workflows/README.md
vendored
|
|
@ -7,7 +7,7 @@ When merging to `preview`:
|
|||
- the VS Code extension along with Rust extension is built and uploaded as an artifact
|
||||
- all of the artifacts are downloaded and pushed to the store/registry all at once, as full releases.
|
||||
- the version is bumped and this change is commited to preview
|
||||
- in the future, the Intellij extension will be built and uploaded to the marketplace here
|
||||
- in the future, the JetBrains extension will be built and uploaded to the marketplace here
|
||||
|
||||
## main
|
||||
|
||||
|
|
@ -16,4 +16,4 @@ When merging to `main`:
|
|||
- the VS Code extension along with Rust extension is built and uploaded as an artifact
|
||||
- all of the artifacts are downloaded and pushed to the store/registry all at once, as full releases.
|
||||
- the version is bumped and this change is commited to main
|
||||
- in the future, the Intellij extension will be built and uploaded to the marketplace here
|
||||
- in the future, the JetBrains extension will be built and uploaded to the marketplace here
|
||||
|
|
|
|||
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
|
|
@ -97,10 +97,12 @@ jobs:
|
|||
cd gui
|
||||
npm ci
|
||||
|
||||
# npm ci doesn't end up capturing the @lancedb/... dep because it's not in the package-lock.json
|
||||
- name: Install Core Dependencies
|
||||
run: |
|
||||
cd core
|
||||
npm ci
|
||||
npm i vectordb
|
||||
|
||||
- name: Run core tests
|
||||
run: |
|
||||
|
|
|
|||
2
.github/workflows/preview.yaml
vendored
2
.github/workflows/preview.yaml
vendored
|
|
@ -92,10 +92,12 @@ jobs:
|
|||
cd gui
|
||||
npm ci
|
||||
|
||||
# npm ci doesn't end up capturing the @lancedb/... dep because it's not in the package-lock.json
|
||||
- name: Install Core Dependencies
|
||||
run: |
|
||||
cd core
|
||||
npm ci
|
||||
npm i vectordb
|
||||
|
||||
- name: Run core tests
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
Separate changelogs are kept for each extension:
|
||||
|
||||
- [VS Code Extension](./extensions/vscode/CHANGELOG.md)
|
||||
- [Intellij Extension](./extensions/intellij/CHANGELOG.md)
|
||||
- [JetBrains Extension](./extensions/intellij/CHANGELOG.md)
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ Pre-requisite: You should use the Intellij IDE, which can be downloaded [here](h
|
|||
|
||||
##### Debugging
|
||||
|
||||
Continue's JetBrains extension shares much of the code with the VS Code extension by utilizing shared code in the `core` directory and packaging it in a binary in the `binary` directory. The Intellij extension (written in Kotlin) is then able to communicate over stdin/stdout in the [CoreMessenger.kt](./extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt) file.
|
||||
Continue's JetBrains extension shares much of the code with the VS Code extension by utilizing shared code in the `core` directory and packaging it in a binary in the `binary` directory. The JetBrains extension (written in Kotlin) is then able to communicate over stdin/stdout in the [CoreMessenger.kt](./extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt) file.
|
||||
|
||||
For the sake of rapid development, it is also possible to configure this communication to happen over local TCP sockets:
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default async function doLoadConfig(
|
|||
await Telemetry.setup(
|
||||
newConfig.allowAnonymousTelemetry ?? true,
|
||||
await ide.getUniqueId(),
|
||||
ideInfo.extensionVersion,
|
||||
ideInfo,
|
||||
);
|
||||
|
||||
if (newConfig.analytics) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export async function getHeaders() {
|
|||
key: constants.c,
|
||||
timestamp: getTimestamp(),
|
||||
v: "1",
|
||||
extensionVersion: Telemetry.extensionVersion ?? "0.0.0",
|
||||
extensionVersion: Telemetry.ideInfo?.extensionVersion ?? "0.0.0",
|
||||
os: Telemetry.os ?? "Unknown",
|
||||
uniqueId: Telemetry.uniqueId ?? "None",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,12 +3,6 @@ import { execSync } from "node:child_process";
|
|||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { ContinueServerClient } from "../continueServer/stubs/client.js";
|
||||
import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js";
|
||||
import { getComputeDeleteAddRemove } from "./refreshIndex.js";
|
||||
import { TestCodebaseIndex } from "./TestCodebaseIndex.js";
|
||||
import { CodebaseIndex } from "./types.js";
|
||||
import { walkDir } from "./walkDir.js";
|
||||
import { getIndexSqlitePath } from "../util/paths.js";
|
||||
import { testConfigHandler, testIde } from "../test/util/fixtures.js";
|
||||
import {
|
||||
addToTestDir,
|
||||
|
|
@ -16,6 +10,12 @@ import {
|
|||
tearDownTestDir,
|
||||
TEST_DIR,
|
||||
} from "../test/util/testDir.js";
|
||||
import { getIndexSqlitePath } from "../util/paths.js";
|
||||
import { CodebaseIndexer, PauseToken } from "./CodebaseIndexer.js";
|
||||
import { getComputeDeleteAddRemove } from "./refreshIndex.js";
|
||||
import { TestCodebaseIndex } from "./TestCodebaseIndex.js";
|
||||
import { CodebaseIndex } from "./types.js";
|
||||
import { walkDir } from "./walkDir.js";
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ class TestCodebaseIndexer extends CodebaseIndexer {
|
|||
|
||||
// These are more like integration tests, whereas we should separately test
|
||||
// the individual CodebaseIndex classes
|
||||
describe.skip("CodebaseIndexer", () => {
|
||||
describe("CodebaseIndexer", () => {
|
||||
const pauseToken = new PauseToken(false);
|
||||
const continueServerClient = new ContinueServerClient(undefined, undefined);
|
||||
const codebaseIndexer = new TestCodebaseIndexer(
|
||||
|
|
@ -71,6 +71,9 @@ describe.skip("CodebaseIndexer", () => {
|
|||
beforeAll(async () => {
|
||||
tearDownTestDir();
|
||||
setUpTestDir();
|
||||
|
||||
execSync('git config --global user.email "test@example.com"');
|
||||
execSync('git config --global user.name "Test"');
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
import os from "node:os";
|
||||
import { TeamAnalytics } from "../control-plane/TeamAnalytics.js";
|
||||
import { IdeInfo } from "../index.js";
|
||||
|
||||
export class Telemetry {
|
||||
// Set to undefined whenever telemetry is disabled
|
||||
static client: any = undefined;
|
||||
static uniqueId = "NOT_UNIQUE";
|
||||
static os: string | undefined = undefined;
|
||||
static extensionVersion: string | undefined = undefined;
|
||||
static ideInfo: IdeInfo | undefined = undefined;
|
||||
|
||||
static async capture(
|
||||
event: string,
|
||||
|
|
@ -19,7 +20,9 @@ export class Telemetry {
|
|||
properties: {
|
||||
...properties,
|
||||
os: Telemetry.os,
|
||||
extensionVersion: Telemetry.extensionVersion,
|
||||
extensionVersion: Telemetry.ideInfo?.extensionVersion,
|
||||
ideName: Telemetry.ideInfo?.name,
|
||||
ideType: Telemetry.ideInfo?.ideType,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -32,14 +35,10 @@ export class Telemetry {
|
|||
Telemetry.client?.shutdown();
|
||||
}
|
||||
|
||||
static async setup(
|
||||
allow: boolean,
|
||||
uniqueId: string,
|
||||
extensionVersion: string,
|
||||
) {
|
||||
static async setup(allow: boolean, uniqueId: string, ideInfo: IdeInfo) {
|
||||
Telemetry.uniqueId = uniqueId;
|
||||
Telemetry.os = os.platform();
|
||||
Telemetry.extensionVersion = extensionVersion;
|
||||
Telemetry.ideInfo = ideInfo;
|
||||
|
||||
if (!allow) {
|
||||
Telemetry.client = undefined;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: 📝 Changelog
|
||||
description: Changelogs for the latest releases of the VSCode and IntelliJ extensions
|
||||
description: Changelogs for the latest releases of the VSCode and JetBrains extensions
|
||||
keywords: [changelog]
|
||||
hide_table_of_contents: true
|
||||
---
|
||||
|
|
@ -8,7 +8,7 @@ hide_table_of_contents: true
|
|||
import VSCodeChangelog from "../../extensions/vscode/CHANGELOG.md";
|
||||
import IntelliJChangelog from "../../extensions/intellij/CHANGELOG.md";
|
||||
|
||||
Below are the changelogs for the latest releases of the VSCode and IntelliJ extensions. Prior to 2024-07-02, the changelogs do not reflect all updates.
|
||||
Below are the changelogs for the latest releases of the VSCode and JetBrains extensions. Prior to 2024-07-02, the changelogs do not reflect all updates.
|
||||
|
||||
import TOCInline from "@theme/TOCInline";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ description: Troubleshooting while waiting for help during beta / alpha testing
|
|||
keywords: [reload, delete, manually, logs, server, console]
|
||||
---
|
||||
|
||||
The Continue VS Code extension is currently in beta, and the Intellij extension is in Alpha. If you are having trouble, please follow the steps below.
|
||||
The Continue VS Code extension is currently in beta, and the JetBrains extension is in Alpha. If you are having trouble, please follow the steps below.
|
||||
|
||||
1. [Check the logs](#check-the-logs)
|
||||
2. [Try the latest pre-release](#download-the-latest-pre-release)
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
execCmdSync("npm run build");
|
||||
}
|
||||
|
||||
// Copy over the dist folder to the Intellij extension //
|
||||
// Copy over the dist folder to the JetBrains extension //
|
||||
const intellijExtensionWebviewPath = path.join(
|
||||
"..",
|
||||
"extensions",
|
||||
|
|
@ -114,7 +114,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
ncp("dist", intellijExtensionWebviewPath, (error) => {
|
||||
if (error) {
|
||||
console.warn(
|
||||
"[error] Error copying React app build to Intellij extension: ",
|
||||
"[error] Error copying React app build to JetBrains extension: ",
|
||||
error,
|
||||
);
|
||||
reject(error);
|
||||
|
|
@ -136,7 +136,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
path.join(intellijExtensionWebviewPath, "onigasm.wasm"),
|
||||
);
|
||||
|
||||
console.log("[info] Copied gui build to Intellij extension");
|
||||
console.log("[info] Copied gui build to JetBrains extension");
|
||||
|
||||
// Then copy over the dist folder to the VSCode extension //
|
||||
const vscodeGuiPath = path.join("../extensions/vscode/gui");
|
||||
|
|
@ -248,7 +248,10 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
"../../../core/llm/tiktokenWorkerPool.mjs",
|
||||
];
|
||||
for (const f of filesToCopy) {
|
||||
fs.copyFileSync(path.join(__dirname, f), path.join(__dirname, "..", "out", path.basename(f)));
|
||||
fs.copyFileSync(
|
||||
path.join(__dirname, f),
|
||||
path.join(__dirname, "..", "out", path.basename(f)),
|
||||
);
|
||||
console.log(`[info] Copied ${path.basename(f)}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ async function buildGui(isGhAction) {
|
|||
execCmdSync("npm run build");
|
||||
}
|
||||
|
||||
// Copy over the dist folder to the Intellij extension //
|
||||
// Copy over the dist folder to the JetBrains extension //
|
||||
const intellijExtensionWebviewPath = path.join(
|
||||
"..",
|
||||
"extensions",
|
||||
|
|
@ -98,7 +98,7 @@ async function buildGui(isGhAction) {
|
|||
ncp("dist", intellijExtensionWebviewPath, (error) => {
|
||||
if (error) {
|
||||
console.warn(
|
||||
"[error] Error copying React app build to Intellij extension: ",
|
||||
"[error] Error copying React app build to JetBrains extension: ",
|
||||
error,
|
||||
);
|
||||
reject(error);
|
||||
|
|
@ -120,7 +120,7 @@ async function buildGui(isGhAction) {
|
|||
path.join(intellijExtensionWebviewPath, "onigasm.wasm"),
|
||||
);
|
||||
|
||||
console.log("[info] Copied gui build to Intellij extension");
|
||||
console.log("[info] Copied gui build to JetBrains extension");
|
||||
|
||||
// Then copy over the dist folder to the VSCode extension //
|
||||
const vscodeGuiPath = path.join("../extensions/vscode/gui");
|
||||
|
|
@ -256,7 +256,7 @@ async function copyNodeModules() {
|
|||
"@esbuild",
|
||||
"@lancedb",
|
||||
"@vscode/ripgrep",
|
||||
"workerpool"
|
||||
"workerpool",
|
||||
];
|
||||
fs.mkdirSync("out/node_modules", { recursive: true });
|
||||
|
||||
|
|
@ -328,15 +328,13 @@ async function downloadEsbuildBinary(target) {
|
|||
"win32-x64":
|
||||
"https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz",
|
||||
}[target];
|
||||
execCmdSync(
|
||||
`curl -L -o out/tmp/esbuild.tgz ${downloadUrl}`,
|
||||
);
|
||||
execCmdSync(`curl -L -o out/tmp/esbuild.tgz ${downloadUrl}`);
|
||||
execCmdSync("cd out/tmp && tar -xvzf esbuild.tgz");
|
||||
// Copy the installed package back to the current directory
|
||||
let tmpPath = "out/tmp/package/bin";
|
||||
let outPath = `out/node_modules/@esbuild/${target}/bin`;
|
||||
if (target.startsWith("win")) {
|
||||
tmpPath = 'out/tmp/package';
|
||||
tmpPath = "out/tmp/package";
|
||||
outPath = `out/node_modules/@esbuild/${target}`;
|
||||
}
|
||||
|
||||
|
|
@ -347,10 +345,7 @@ async function downloadEsbuildBinary(target) {
|
|||
{ dereference: true },
|
||||
(error) => {
|
||||
if (error) {
|
||||
console.error(
|
||||
`[error] Error copying esbuild package`,
|
||||
error,
|
||||
);
|
||||
console.error(`[error] Error copying esbuild package`, error);
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
|
|
@ -358,7 +353,7 @@ async function downloadEsbuildBinary(target) {
|
|||
},
|
||||
);
|
||||
});
|
||||
rimrafSync("out/tmp")
|
||||
rimrafSync("out/tmp");
|
||||
}
|
||||
|
||||
async function downloadSqliteBinary(target) {
|
||||
|
|
@ -408,7 +403,8 @@ async function copySqliteBinary() {
|
|||
async function downloadRipgrepBinary(target) {
|
||||
console.log("[info] Downloading pre-built ripgrep binary");
|
||||
rimrafSync("node_modules/@vscode/ripgrep/bin");
|
||||
fs.mkdirSync("node_modules/@vscode/ripgrep/bin", { recursive: true });4
|
||||
fs.mkdirSync("node_modules/@vscode/ripgrep/bin", { recursive: true });
|
||||
4;
|
||||
const downloadUrl = {
|
||||
"darwin-arm64":
|
||||
"https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-10/ripgrep-v13.0.0-10-aarch64-apple-darwin.tar.gz",
|
||||
|
|
@ -424,8 +420,7 @@ async function downloadRipgrepBinary(target) {
|
|||
"https://github.com/microsoft/ripgrep-prebuilt/releases/download/v13.0.0-10/ripgrep-v13.0.0-10-x86_64-pc-windows-msvc.zip",
|
||||
}[target];
|
||||
|
||||
|
||||
if(target.startsWith("win")) {
|
||||
if (target.startsWith("win")) {
|
||||
execCmdSync(
|
||||
`curl -L -o node_modules/@vscode/ripgrep/bin/build.zip ${downloadUrl}`,
|
||||
);
|
||||
|
|
@ -435,7 +430,9 @@ async function downloadRipgrepBinary(target) {
|
|||
execCmdSync(
|
||||
`curl -L -o node_modules/@vscode/ripgrep/bin/build.tar.gz ${downloadUrl}`,
|
||||
);
|
||||
execCmdSync("cd node_modules/@vscode/ripgrep/bin && tar -xvzf build.tar.gz");
|
||||
execCmdSync(
|
||||
"cd node_modules/@vscode/ripgrep/bin && tar -xvzf build.tar.gz",
|
||||
);
|
||||
fs.unlinkSync("node_modules/@vscode/ripgrep/bin/build.tar.gz");
|
||||
}
|
||||
}
|
||||
|
|
@ -512,5 +509,5 @@ module.exports = {
|
|||
installNodeModuleInTempDirAndCopyToCurrent,
|
||||
downloadSqliteBinary,
|
||||
downloadRipgrepBinary,
|
||||
copyTokenizers
|
||||
copyTokenizers,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue