Skip to content

Commit 1e25984

Browse files
committed
test: skip infer test on Ubuntu 20 and below
1 parent 69b2c1b commit 1e25984

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/infer/__tests__/infer.test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { info } from "ci-log"
2+
import { isUbuntu } from "../../utils/env/isUbuntu.js"
3+
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
14
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
25
import { getVersion } from "../../versions/versions.js"
36
import { setupInfer } from "../infer.js"
@@ -6,6 +9,9 @@ jest.setTimeout(300000)
69

710
describe("setup-infer", () => {
811
if (process.platform === "win32") {
12+
it("should skip infer tests on windows", () => {
13+
expect(true).toBe(true)
14+
})
915
return
1016
}
1117

@@ -16,6 +22,12 @@ describe("setup-infer", () => {
1622
})
1723

1824
it("should setup infer", async () => {
25+
/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */
26+
if (isUbuntu() && (await ubuntuVersion())?.[0]! <= 20) {
27+
info("Skipping infer test on ubuntu 20 and below")
28+
return
29+
}
30+
1931
const { binDir } = await setupInfer(getVersion("infer", "true"), directory, process.arch)
2032
await testBin("infer", ["--version"], binDir)
2133
})

0 commit comments

Comments
 (0)