Merge pull request #2227 from github/elena/disable-local-retry

Only retry tests in CI
This commit is contained in:
Elena Tanasoiu
2023-03-23 16:13:30 +00:00
committed by GitHub
3 changed files with 11 additions and 6 deletions

View File

@@ -199,6 +199,7 @@ jobs:
run: echo "cli-versions=$(cat ./extensions/ql-vscode/supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT
outputs:
cli-versions: ${{ steps.set-variables.outputs.cli-versions }}
cli-test:
name: CLI Test
runs-on: ${{ matrix.os }}

View File

@@ -5,9 +5,11 @@ import * as tmp from "tmp";
import { realpathSync } from "fs-extra";
import { setStoragePath, storagePath } from "./global.helper";
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
if (process.env.CI) {
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
}
// create an extension storage location
let removeStorage: tmp.DirResult["removeCallback"] | undefined;

View File

@@ -1,9 +1,11 @@
import { env } from "vscode";
import { beforeEachAction } from "./test-config";
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
if (process.env.CI) {
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
}
beforeEach(async () => {
jest.spyOn(env, "openExternal").mockResolvedValue(false);