diff --git a/src/infer/__tests__/infer.test.ts b/src/infer/__tests__/infer.test.ts index 8f28546d..014b7f0b 100644 --- a/src/infer/__tests__/infer.test.ts +++ b/src/infer/__tests__/infer.test.ts @@ -1,3 +1,6 @@ +import { info } from "ci-log" +import { isUbuntu } from "../../utils/env/isUbuntu.js" +import { ubuntuVersion } from "../../utils/env/ubuntu_version.js" import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js" import { getVersion } from "../../versions/versions.js" import { setupInfer } from "../infer.js" @@ -6,6 +9,9 @@ jest.setTimeout(300000) describe("setup-infer", () => { if (process.platform === "win32") { + it("should skip infer tests on windows", () => { + expect(true).toBe(true) + }) return } @@ -16,6 +22,12 @@ describe("setup-infer", () => { }) it("should setup infer", async () => { + /* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */ + if (isUbuntu() && (await ubuntuVersion())?.[0]! <= 20) { + info("Skipping infer test on ubuntu 20 and below") + return + } + const { binDir } = await setupInfer(getVersion("infer", "true"), directory, process.arch) await testBin("infer", ["--version"], binDir) })