diff --git a/packages/create-plugin/__e2e__/setup.ts b/packages/create-plugin/__e2e__/setup.ts new file mode 100644 index 0000000000..6e0bb99617 --- /dev/null +++ b/packages/create-plugin/__e2e__/setup.ts @@ -0,0 +1,5 @@ +const isRunOnActions = () => !!process.env.GITHUB_ACTIONS; + +if (isRunOnActions()) { + jest.retryTimes(3, { logErrorsBeforeRetry: true }); +} diff --git a/packages/create-plugin/jest.e2e.config.js b/packages/create-plugin/jest.e2e.config.js index e9670b536c..b6c9727843 100644 --- a/packages/create-plugin/jest.e2e.config.js +++ b/packages/create-plugin/jest.e2e.config.js @@ -3,6 +3,7 @@ const config = { roots: [""], testRegex: "/__e2e__/.*\\.test\\.ts$", testEnvironment: "./JestCustomEnvironment.js", + setupFilesAfterEnv: ["/__e2e__/setup.ts"], testTimeout: 120000, }; module.exports = config;