diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99d99cb..3216ecb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,10 @@ name: Release on: - release: - types: - - published + pull_request: + types: [synchronize] + push: + branches: + - main workflow_dispatch: jobs: @@ -14,10 +16,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 18 registry-url: https://registry.npmjs.org/ - - name: Install the dependencies + - name: Install npm dependencies run: npm install - name: Build and run automation tests diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts index 6bccaf9..23a1a14 100644 --- a/src/test/suite/extension.test.ts +++ b/src/test/suite/extension.test.ts @@ -8,11 +8,17 @@ import * as vscode from "vscode"; import { makeRequest } from "./sendPostRequest"; // import * as myExtension from '../extension'; +async function sleep(ms: number): Promise { + return new Promise( + (resolve) => setTimeout(resolve, ms)); +} + suite("Extension Test Suite", () => { suiteSetup(async () => { const sampleWorkspace = path.resolve(__dirname, "../../../sampleWorkspace"); let uri = vscode.Uri.file(sampleWorkspace); await vscode.commands.executeCommand("vscode.openFolder", uri); + await sleep(3000); }); suiteTeardown(() => {});