Skip to content

Commit

Permalink
test: skip infer test on Ubuntu 20 and below
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 19, 2024
1 parent 69b2c1b commit 1e25984
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/infer/__tests__/infer.test.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
}

Expand All @@ -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)
})
Expand Down

0 comments on commit 1e25984

Please sign in to comment.