From 9ec3b190f1b49ce303e55a019259be9202d0c47c Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 30 Jan 2025 09:25:49 -0800 Subject: [PATCH 1/7] Add ability to update the target quid for a deployment at any time (from ... menu) --- extensions/vscode/package.json | 9 +++++++++ extensions/vscode/src/actions/showAssociateGUID.ts | 7 ++++++- extensions/vscode/src/constants.ts | 1 + extensions/vscode/src/views/homeView.ts | 5 +++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 2960d80f0..d03b7a5f7 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -135,6 +135,11 @@ "title": "Select Active Configuration For Deployment", "category": "Posit Publisher" }, + { + "command": "posit.publisher.homeView.showAssociateDeployment", + "title": "Associate with a Different Deployment on Connect", + "category": "Posit Publisher" + }, { "command": "posit.publisher.homeView.createConfigForDeployment", "title": "Create New Configuration For Destination", @@ -325,6 +330,10 @@ "command": "posit.publisher.homeView.showSelectConfigForDeployment", "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs'" }, + { + "command": "posit.publisher.homeView.showAssociateDeployment", + "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs'" + }, { "command": "posit.publisher.homeView.createConfigForDeployment", "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-no-matching-configs'" diff --git a/extensions/vscode/src/actions/showAssociateGUID.ts b/extensions/vscode/src/actions/showAssociateGUID.ts index 7d89f9d74..42849e2b1 100644 --- a/extensions/vscode/src/actions/showAssociateGUID.ts +++ b/extensions/vscode/src/actions/showAssociateGUID.ts @@ -44,12 +44,17 @@ export async function showAssociateGUID(state: PublisherState) { } await showProgress("Updating Content Record", Views.HomeView, async () => { const api = await useApi(); - await api.contentRecords.patch( + const result = await api.contentRecords.patch( targetContentRecord.deploymentName, targetContentRecord.projectDir, { guid, }, ); + if (result.status === 200) { + window.showInformationMessage( + `Deployment is now associated with Content GUID ${guid} as requested. An error will be displayed if this deployment cannot update this deployment on the Connect Server.`, + ); + } }); } diff --git a/extensions/vscode/src/constants.ts b/extensions/vscode/src/constants.ts index e072f448c..0a8c88eb4 100644 --- a/extensions/vscode/src/constants.ts +++ b/extensions/vscode/src/constants.ts @@ -66,6 +66,7 @@ const homeViewCommands = { Refresh: "posit.publisher.homeView.refresh", ShowSelectConfigForDeployment: "posit.publisher.homeView.showSelectConfigForDeployment", + ShowAssociateDeployment: "posit.publisher.homeView.showAssociateDeployment", CreateConfigForDeployment: "posit.publisher.homeView.createConfigForDeployment", SelectDeployment: "posit.publisher.homeView.selectDeployment", diff --git a/extensions/vscode/src/views/homeView.ts b/extensions/vscode/src/views/homeView.ts index ec52885f7..b20727c15 100644 --- a/extensions/vscode/src/views/homeView.ts +++ b/extensions/vscode/src/views/homeView.ts @@ -1782,6 +1782,11 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { this.showSelectOrCreateConfigForDeployment, this, ), + commands.registerCommand( + Commands.HomeView.ShowAssociateDeployment, + () => showAssociateGUID(this.state), + this, + ), commands.registerCommand( Commands.HomeView.CreateConfigForDeployment, this.showSelectOrCreateConfigForDeployment, From c9b205794554b73eb7db3aa0986cc27e43f8c4e7 Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 30 Jan 2025 13:44:56 -0800 Subject: [PATCH 2/7] contextually hide or show associate guid if we have credentials to contact server or not. --- extensions/vscode/package.json | 2 +- extensions/vscode/src/extension.ts | 17 +++++++++++++++++ .../src/types/messages/webviewToHostMessages.ts | 14 ++++++++++++-- extensions/vscode/src/views/homeView.ts | 14 ++++++++++++++ .../vscode/webviews/homeView/src/stores/home.ts | 12 ++++++++++++ 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index d03b7a5f7..b47295a1e 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -332,7 +332,7 @@ }, { "command": "posit.publisher.homeView.showAssociateDeployment", - "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs'" + "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs' && posit.publish.selection.haveCredentialMatch == 'true'" }, { "command": "posit.publisher.homeView.createConfigForDeployment", diff --git a/extensions/vscode/src/extension.ts b/extensions/vscode/src/extension.ts index 412d444a7..7e017ed17 100644 --- a/extensions/vscode/src/extension.ts +++ b/extensions/vscode/src/extension.ts @@ -31,6 +31,13 @@ enum InitializationInProgress { false = "false", } +const SELECTION_HAS_CREDENTIAL_MATCH_CONTEXT = + "posit.publish.selection.haveCredentialMatch"; +export enum SelectionCredentialMatch { + true = "true", + false = "false", +} + // Once the extension is activate, hang on to the service so that we can stop it on deactivation. let service: Service; @@ -42,6 +49,16 @@ function setInitializationInProgressContext(context: InitializationInProgress) { commands.executeCommand("setContext", INITIALIZING_CONTEXT, context); } +export function setSelectionHasCredentialMatch( + context: SelectionCredentialMatch, +) { + commands.executeCommand( + "setContext", + SELECTION_HAS_CREDENTIAL_MATCH_CONTEXT, + context, + ); +} + // This method is called when your extension is activated // Your extension is activated the very first time the command is executed export async function activate(context: ExtensionContext) { diff --git a/extensions/vscode/src/types/messages/webviewToHostMessages.ts b/extensions/vscode/src/types/messages/webviewToHostMessages.ts index b83a064d5..8ca6aad4e 100644 --- a/extensions/vscode/src/types/messages/webviewToHostMessages.ts +++ b/extensions/vscode/src/types/messages/webviewToHostMessages.ts @@ -27,6 +27,7 @@ export enum WebviewToHostMessageType { NEW_CREDENTIAL = "newCredential", VIEW_PUBLISHING_LOG = "viewPublishingLog", SHOW_ASSOCIATE_GUID = "ShowAssociateGUID", + UPDATE_SELECTION_CREDENTIAL_STATE = "UpdateSelectionCredentialStateMsg", } export type AnyWebviewToHostMessage< @@ -62,7 +63,8 @@ export type WebviewToHostMessage = | NewCredentialForDeploymentMsg | NewCredentialMsg | ViewPublishingLog - | ShowAssociateGUIDMsg; + | ShowAssociateGUIDMsg + | UpdateSelectionCredentialStateMsg; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function isWebviewToHostMessage(msg: any): msg is WebviewToHostMessage { @@ -89,7 +91,8 @@ export function isWebviewToHostMessage(msg: any): msg is WebviewToHostMessage { msg.kind === WebviewToHostMessageType.NEW_CREDENTIAL_FOR_DEPLOYMENT || msg.kind === WebviewToHostMessageType.NEW_CREDENTIAL || msg.kind === WebviewToHostMessageType.VIEW_PUBLISHING_LOG || - msg.kind === WebviewToHostMessageType.SHOW_ASSOCIATE_GUID + msg.kind === WebviewToHostMessageType.SHOW_ASSOCIATE_GUID || + msg.kind === WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE ); } @@ -210,3 +213,10 @@ export type ViewPublishingLog = export type ShowAssociateGUIDMsg = AnyWebviewToHostMessage; + +export type UpdateSelectionCredentialStateMsg = AnyWebviewToHostMessage< + WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE, + { + state: string; + } +>; diff --git a/extensions/vscode/src/views/homeView.ts b/extensions/vscode/src/views/homeView.ts index b20727c15..003905367 100644 --- a/extensions/vscode/src/views/homeView.ts +++ b/extensions/vscode/src/views/homeView.ts @@ -82,6 +82,10 @@ import { showAssociateGUID } from "src/actions/showAssociateGUID"; import { extensionSettings } from "src/extension"; import { openFileInEditor } from "src/commands"; import { showImmediateDeploymentFailureMessage } from "./publishFailures"; +import { + SelectionCredentialMatch, + setSelectionHasCredentialMatch, +} from "../extension"; enum HomeViewInitialized { initialized = "initialized", @@ -174,6 +178,8 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { return this.showPublishingLog(); case WebviewToHostMessageType.SHOW_ASSOCIATE_GUID: return showAssociateGUID(this.state); + case WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE: + return this.updateSelectionCredentialState(msg.content.state); default: window.showErrorMessage( `Internal Error: onConduitMessage unhandled msg: ${JSON.stringify(msg)}`, @@ -189,6 +195,14 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { ); } + private async updateSelectionCredentialState(state: string) { + const match = + state === SelectionCredentialMatch.true + ? SelectionCredentialMatch.true + : SelectionCredentialMatch.false; + return await setSelectionHasCredentialMatch(match); + } + private async initiateDeployment( deploymentName: string, credentialName: string, diff --git a/extensions/vscode/webviews/homeView/src/stores/home.ts b/extensions/vscode/webviews/homeView/src/stores/home.ts index f50e8745f..423931e60 100644 --- a/extensions/vscode/webviews/homeView/src/stores/home.ts +++ b/extensions/vscode/webviews/homeView/src/stores/home.ts @@ -179,6 +179,18 @@ export const useHomeStore = defineStore("home", () => { selectedContentRecord.value = contentRecord; } + watch([serverCredential], () => updateSelectionCredentialStatus()); + + const updateSelectionCredentialStatus = () => { + const hostConduit = useHostConduitService(); + hostConduit.sendMsg({ + kind: WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE, + content: { + state: serverCredential !== undefined ? "true" : "false", + }, + }); + }; + watch([selectedConfiguration], () => updateParentViewSelectionState()); const updateParentViewSelectionState = () => { From a6250d98a85b9f6d1716da73958c46bbf88d084c Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Mon, 10 Feb 2025 10:32:25 -0800 Subject: [PATCH 3/7] Updates from PR feedback. Added additional context, a missing try/catch and some renames. --- extensions/vscode/package.json | 6 ++-- .../vscode/src/actions/showAssociateGUID.ts | 29 ++++++++++++------- extensions/vscode/src/constants.ts | 2 +- extensions/vscode/src/extension.ts | 19 +++++++++++- .../types/messages/webviewToHostMessages.ts | 14 +++++++-- extensions/vscode/src/views/homeView.ts | 14 ++++++++- .../webviews/homeView/src/stores/home.ts | 19 +++++++++++- 7 files changed, 84 insertions(+), 19 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index b47295a1e..6e66199e3 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -136,7 +136,7 @@ "category": "Posit Publisher" }, { - "command": "posit.publisher.homeView.showAssociateDeployment", + "command": "posit.publisher.homeView.associateDeployment", "title": "Associate with a Different Deployment on Connect", "category": "Posit Publisher" }, @@ -331,8 +331,8 @@ "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs'" }, { - "command": "posit.publisher.homeView.showAssociateDeployment", - "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs' && posit.publish.selection.haveCredentialMatch == 'true'" + "command": "posit.publisher.homeView.associateDeployment", + "when": "webviewId == 'posit.publisher.homeView' && webviewSection == 'even-easier-deploy-more-menu-matching-configs' && posit.publish.selection.hasCredentialMatch == 'true' && posit.publish.selection.isPreContentRecord == 'false'" }, { "command": "posit.publisher.homeView.createConfigForDeployment", diff --git a/extensions/vscode/src/actions/showAssociateGUID.ts b/extensions/vscode/src/actions/showAssociateGUID.ts index 42849e2b1..73ba7164a 100644 --- a/extensions/vscode/src/actions/showAssociateGUID.ts +++ b/extensions/vscode/src/actions/showAssociateGUID.ts @@ -6,6 +6,7 @@ import { PublisherState } from "src/state"; import { showProgress } from "src/utils/progress"; import { Views } from "src/constants"; import { useApi } from "src/api"; +import { getSummaryStringFromError } from "src/utils/errors"; export async function showAssociateGUID(state: PublisherState) { const urlOrGuid = ""; @@ -43,17 +44,25 @@ export async function showAssociateGUID(state: PublisherState) { return undefined; } await showProgress("Updating Content Record", Views.HomeView, async () => { - const api = await useApi(); - const result = await api.contentRecords.patch( - targetContentRecord.deploymentName, - targetContentRecord.projectDir, - { - guid, - }, - ); - if (result.status === 200) { + try { + const api = await useApi(); + await api.contentRecords.patch( + targetContentRecord.deploymentName, + targetContentRecord.projectDir, + { + guid, + }, + ); window.showInformationMessage( - `Deployment is now associated with Content GUID ${guid} as requested. An error will be displayed if this deployment cannot update this deployment on the Connect Server.`, + `Your deployment is now locally associated with Content GUID ${guid} as requested.`, + ); + } catch (error: unknown) { + const summary = getSummaryStringFromError( + "showAssociateGUID, contentRecords.patch", + error, + ); + window.showErrorMessage( + `Unable to associate deployment with Content GUID ${guid}. ${summary}`, ); } }); diff --git a/extensions/vscode/src/constants.ts b/extensions/vscode/src/constants.ts index 0a8c88eb4..81138b10a 100644 --- a/extensions/vscode/src/constants.ts +++ b/extensions/vscode/src/constants.ts @@ -66,7 +66,7 @@ const homeViewCommands = { Refresh: "posit.publisher.homeView.refresh", ShowSelectConfigForDeployment: "posit.publisher.homeView.showSelectConfigForDeployment", - ShowAssociateDeployment: "posit.publisher.homeView.showAssociateDeployment", + AssociateDeployment: "posit.publisher.homeView.associateDeployment", CreateConfigForDeployment: "posit.publisher.homeView.createConfigForDeployment", SelectDeployment: "posit.publisher.homeView.selectDeployment", diff --git a/extensions/vscode/src/extension.ts b/extensions/vscode/src/extension.ts index 7e017ed17..9e18beff3 100644 --- a/extensions/vscode/src/extension.ts +++ b/extensions/vscode/src/extension.ts @@ -32,12 +32,19 @@ enum InitializationInProgress { } const SELECTION_HAS_CREDENTIAL_MATCH_CONTEXT = - "posit.publish.selection.haveCredentialMatch"; + "posit.publish.selection.hasCredentialMatch"; export enum SelectionCredentialMatch { true = "true", false = "false", } +const SELECTION_IS_PRE_CONTENT_RECORD_CONTEXT = + "posit.publish.selection.isPreContentRecord"; +export enum SelectionIsPreContentRecord { + true = "true", + false = "false", +} + // Once the extension is activate, hang on to the service so that we can stop it on deactivation. let service: Service; @@ -59,6 +66,16 @@ export function setSelectionHasCredentialMatch( ); } +export function setSelectionIsPreContentRecord( + context: SelectionIsPreContentRecord, +) { + commands.executeCommand( + "setContext", + SELECTION_IS_PRE_CONTENT_RECORD_CONTEXT, + context, + ); +} + // This method is called when your extension is activated // Your extension is activated the very first time the command is executed export async function activate(context: ExtensionContext) { diff --git a/extensions/vscode/src/types/messages/webviewToHostMessages.ts b/extensions/vscode/src/types/messages/webviewToHostMessages.ts index 8ca6aad4e..9f830db54 100644 --- a/extensions/vscode/src/types/messages/webviewToHostMessages.ts +++ b/extensions/vscode/src/types/messages/webviewToHostMessages.ts @@ -28,6 +28,7 @@ export enum WebviewToHostMessageType { VIEW_PUBLISHING_LOG = "viewPublishingLog", SHOW_ASSOCIATE_GUID = "ShowAssociateGUID", UPDATE_SELECTION_CREDENTIAL_STATE = "UpdateSelectionCredentialStateMsg", + UPDATE_SELECTION_IS_PRE_CONTENT_RECORD = "UpdateSelectionIsPreContentRecordMsg", } export type AnyWebviewToHostMessage< @@ -64,7 +65,8 @@ export type WebviewToHostMessage = | NewCredentialMsg | ViewPublishingLog | ShowAssociateGUIDMsg - | UpdateSelectionCredentialStateMsg; + | UpdateSelectionCredentialStateMsg + | UpdateSelectionIsPreContentRecordMsg; // eslint-disable-next-line @typescript-eslint/no-explicit-any export function isWebviewToHostMessage(msg: any): msg is WebviewToHostMessage { @@ -92,7 +94,8 @@ export function isWebviewToHostMessage(msg: any): msg is WebviewToHostMessage { msg.kind === WebviewToHostMessageType.NEW_CREDENTIAL || msg.kind === WebviewToHostMessageType.VIEW_PUBLISHING_LOG || msg.kind === WebviewToHostMessageType.SHOW_ASSOCIATE_GUID || - msg.kind === WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE + msg.kind === WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE || + msg.kind === WebviewToHostMessageType.UPDATE_SELECTION_IS_PRE_CONTENT_RECORD ); } @@ -220,3 +223,10 @@ export type UpdateSelectionCredentialStateMsg = AnyWebviewToHostMessage< state: string; } >; + +export type UpdateSelectionIsPreContentRecordMsg = AnyWebviewToHostMessage< + WebviewToHostMessageType.UPDATE_SELECTION_IS_PRE_CONTENT_RECORD, + { + state: string; + } +>; diff --git a/extensions/vscode/src/views/homeView.ts b/extensions/vscode/src/views/homeView.ts index 003905367..9d2762085 100644 --- a/extensions/vscode/src/views/homeView.ts +++ b/extensions/vscode/src/views/homeView.ts @@ -85,6 +85,8 @@ import { showImmediateDeploymentFailureMessage } from "./publishFailures"; import { SelectionCredentialMatch, setSelectionHasCredentialMatch, + SelectionIsPreContentRecord, + setSelectionIsPreContentRecord, } from "../extension"; enum HomeViewInitialized { @@ -180,6 +182,8 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { return showAssociateGUID(this.state); case WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE: return this.updateSelectionCredentialState(msg.content.state); + case WebviewToHostMessageType.UPDATE_SELECTION_IS_PRE_CONTENT_RECORD: + return this.updateSelectionIsPreContentRecordState(msg.content.state); default: window.showErrorMessage( `Internal Error: onConduitMessage unhandled msg: ${JSON.stringify(msg)}`, @@ -203,6 +207,14 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { return await setSelectionHasCredentialMatch(match); } + private async updateSelectionIsPreContentRecordState(state: string) { + const match = + state === SelectionIsPreContentRecord.true + ? SelectionIsPreContentRecord.true + : SelectionIsPreContentRecord.false; + return await setSelectionIsPreContentRecord(match); + } + private async initiateDeployment( deploymentName: string, credentialName: string, @@ -1797,7 +1809,7 @@ export class HomeViewProvider implements WebviewViewProvider, Disposable { this, ), commands.registerCommand( - Commands.HomeView.ShowAssociateDeployment, + Commands.HomeView.AssociateDeployment, () => showAssociateGUID(this.state), this, ), diff --git a/extensions/vscode/webviews/homeView/src/stores/home.ts b/extensions/vscode/webviews/homeView/src/stores/home.ts index 423931e60..31699235d 100644 --- a/extensions/vscode/webviews/homeView/src/stores/home.ts +++ b/extensions/vscode/webviews/homeView/src/stores/home.ts @@ -9,6 +9,7 @@ import { PreContentRecord, Configuration, ConfigurationError, + isPreContentRecord, } from "../../../../src/api"; import { isConfigurationError } from "../../../../src/api/types/configurations"; import { WebviewToHostMessageType } from "../../../../src/types/messages/webviewToHostMessages"; @@ -186,7 +187,23 @@ export const useHomeStore = defineStore("home", () => { hostConduit.sendMsg({ kind: WebviewToHostMessageType.UPDATE_SELECTION_CREDENTIAL_STATE, content: { - state: serverCredential !== undefined ? "true" : "false", + state: serverCredential.value !== undefined ? "true" : "false", + }, + }); + }; + + watch([selectedContentRecord], () => + updateSelectionIsPreContentRecordState(), + ); + + const updateSelectionIsPreContentRecordState = () => { + const hostConduit = useHostConduitService(); + hostConduit.sendMsg({ + kind: WebviewToHostMessageType.UPDATE_SELECTION_IS_PRE_CONTENT_RECORD, + content: { + state: isPreContentRecord(selectedContentRecord.value) + ? "true" + : "false", }, }); }; From 309ed31c05a976c1e9a0be270d1e99d108d2d6df Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 13 Feb 2025 14:43:09 -0800 Subject: [PATCH 4/7] need to npm install parent directory --- .github/workflows/home-view-unit-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/home-view-unit-test.yaml b/.github/workflows/home-view-unit-test.yaml index 1e234a7f7..a603cb9af 100644 --- a/.github/workflows/home-view-unit-test.yaml +++ b/.github/workflows/home-view-unit-test.yaml @@ -13,5 +13,6 @@ jobs: node-version: "20" cache: "npm" cache-dependency-path: "**/package-lock.json" + - run: npm install --prefix ../.. - run: npm install - run: npm test From 44c453485280780e0a0009bff2c24480e9056b4a Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 13 Feb 2025 14:51:34 -0800 Subject: [PATCH 5/7] test without current install directory --- .github/workflows/home-view-unit-test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/home-view-unit-test.yaml b/.github/workflows/home-view-unit-test.yaml index a603cb9af..617b47cfb 100644 --- a/.github/workflows/home-view-unit-test.yaml +++ b/.github/workflows/home-view-unit-test.yaml @@ -14,5 +14,4 @@ jobs: cache: "npm" cache-dependency-path: "**/package-lock.json" - run: npm install --prefix ../.. - - run: npm install - run: npm test From fe2e0ee8ae62ea5d5c00f10a58ec40bc694c4273 Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 13 Feb 2025 14:54:26 -0800 Subject: [PATCH 6/7] rename and run rpm install on parent as well. Must have had impact of previous step being removed. --- .github/workflows/home-view-unit-test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/home-view-unit-test.yaml b/.github/workflows/home-view-unit-test.yaml index 617b47cfb..9c114fade 100644 --- a/.github/workflows/home-view-unit-test.yaml +++ b/.github/workflows/home-view-unit-test.yaml @@ -1,4 +1,4 @@ -name: Lint +name: Unit-Test on: [workflow_call] jobs: lint: @@ -14,4 +14,5 @@ jobs: cache: "npm" cache-dependency-path: "**/package-lock.json" - run: npm install --prefix ../.. + - run: npm install - run: npm test From 96043f5d034bd1a5b6aa4a0c9542c34e1cdf2a3d Mon Sep 17 00:00:00 2001 From: Bill Sager Date: Thu, 13 Feb 2025 14:56:55 -0800 Subject: [PATCH 7/7] rename - this is not a lint sep --- .github/workflows/home-view-unit-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/home-view-unit-test.yaml b/.github/workflows/home-view-unit-test.yaml index 9c114fade..143ab9141 100644 --- a/.github/workflows/home-view-unit-test.yaml +++ b/.github/workflows/home-view-unit-test.yaml @@ -1,7 +1,7 @@ name: Unit-Test on: [workflow_call] jobs: - lint: + test: runs-on: ubuntu-latest defaults: run: