Skip to content

[Do-Not-Merge] Test pipeline #6941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .chronus/changes/UITestPipeline-2025-3-10-11-26-36.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chunyu3 ehat is the goal here this is not how any of the packages in the workspace are supposed to do add things. This is only meant for the standalone emitters that can’t be part of the existing pipeline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @timotheeguerin After offline discussion, we will not separate a pipeline for typespec vscode extension UI testing. We will investigate the solution to run UI in Linux first, and then try to deploy the UI test in existing tsp-core pipeline. If the performance is bad or it is not stable enough, we will try to deploy a github action.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- typespec-vscode
---

add pipeline to run vscode extension UI test
2 changes: 2 additions & 0 deletions eng/common/config/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const AreaPaths: Record<keyof typeof AreaLabels, string[]> = {
"compiler:core": ["packages/compiler/"],
"compiler:emitter-framework": [],
ide: ["packages/typespec-vscode/", "packages/typespec-vs/"],
"ide:vscode": ["packages/typespec-vscode/"],
"lib:http": ["packages/http/"],
"lib:openapi": ["packages/openapi/"],
"lib:rest": ["packages/rest/"],
Expand Down Expand Up @@ -60,6 +61,7 @@ export const CIRules = {
...ignore(AreaPaths["emitter:client:java"]),
...ignore(AreaPaths["emitter:client:python"]),
],
VSCode: [...AreaPaths["ide:vscode"]],
};

function ignore(paths: string[]) {
Expand Down
4 changes: 4 additions & 0 deletions eng/common/config/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const AreaLabels = defineLabels({
color: "846da1",
description: "Issues for VS, VSCode, Monaco, etc.",
},
"ide:vscode": {
color: "846da1",
description: "Issues for VSCode",
},
"lib:http": {
color: "c7aee6",
description: "",
Expand Down
6 changes: 6 additions & 0 deletions eng/common/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ extends:
DependsOn: InitStage
Condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunPython'])

# Run vscode stages if RunVSCode == true
- template: /packages/typespec-vscode/eng/pipeline/templates/ci-stages.yml
parameters:
DependsOn: InitStage
Condition: eq('true', stageDependencies.InitStage.outputs['InitJob.InitStep.RunVSCode'])

# Run core stages if RunCore == true
- template: /eng/tsp-core/pipelines/stages/ci-stages.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions packages/typespec-vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
templates/
!eng/pipeline/templates
21 changes: 21 additions & 0 deletions packages/typespec-vscode/eng/pipeline/templates/ci-stages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
- name: Condition
type: string
default: true
- name: DependsOn
type: object
default: []

stages:
- stage: vscode_extension_UI_Test
displayName: "VSCode Extension - UI Test"
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
jobs:
- job: UI_Test
displayName: "UI Test"
steps:
- template: /eng/tsp-core/pipelines/templates/install.yml
- template: /eng/tsp-core/pipelines/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ interface EmitQuickPickButton extends QuickInputButton {
uri: string;
}

/**
* configure emitter.
* @param context
* @returns emitter
*/
async function configureEmitter(context: vscode.ExtensionContext): Promise<Emitter | undefined> {
const emitterKinds = getRegisterEmitterTypes();
const toEmitterTypeQuickPickItem = (kind: EmitterKind): any => {
Expand Down
Loading