diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a216500..4d45c92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,18 +47,16 @@ on: jobs: # `permissions: {}` above grants the jobs nothing, and a called workflow may # not request more than its caller was granted -- asking for more is rejected - # before any job runs, with no check run produced to say so. Both callees - # declare `contents: read`, so both callers have to grant it. lint: permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-lint.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 + uses: reqstool/.github/.github/workflows/typescript-lint.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 build: needs: lint permissions: contents: read - uses: reqstool/.github/.github/workflows/typescript-build.yml@6fc8d3e3d4c3fdf7a83cb7b7a274e4761486ca71 # 1.2.1 + uses: reqstool/.github/.github/workflows/typescript-build.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 with: use-xvfb: true ref: ${{ inputs.ref }} @@ -66,3 +64,22 @@ jobs: artifact-name: ${{ inputs.artifact-name || 'dist' }} dependency-version: ${{ inputs.reqstool_version || 'latest' }} dependency-install-command: ${{ inputs.reqstool_version != '' && 'pipx install reqstool=={version}' || 'pipx install reqstool' }} + + smoke: + needs: build + permissions: + contents: read + uses: reqstool/.github/.github/workflows/typescript-smoke.yml@91cd368066d5458b5d46bdf34c4d8ca483f6633f # 1.2.2 + with: + command: npm test || { grep -E -B2 -A12 ' { assert.ok(ext, "Extension reqstool.reqstool not found"); }); - it("reqstool.selectServerSource command is registered", async () => { - const commands = await vscode.commands.getCommands(true); - assert.ok( - commands.includes("reqstool.selectServerSource"), - "reqstool.selectServerSource command not registered", - ); + it("reqstool.selectServerSource command is registered", async function () { + this.timeout(60000); + const deadline = Date.now() + 55000; + let registered = false; + while (!registered && Date.now() < deadline) { + registered = (await vscode.commands.getCommands(true)).includes( + "reqstool.selectServerSource", + ); + if (!registered) { + await new Promise((resolve) => setTimeout(resolve, 500)); + } + } + assert.ok(registered, "reqstool.selectServerSource command not registered"); }); });