mirror of https://github.com/aminya/setup-cpp
test: skip infer test on Ubuntu 20 and below
This commit is contained in:
parent
69b2c1b021
commit
1e259843db
|
@ -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 { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
|
||||||
import { getVersion } from "../../versions/versions.js"
|
import { getVersion } from "../../versions/versions.js"
|
||||||
import { setupInfer } from "../infer.js"
|
import { setupInfer } from "../infer.js"
|
||||||
|
@ -6,6 +9,9 @@ jest.setTimeout(300000)
|
||||||
|
|
||||||
describe("setup-infer", () => {
|
describe("setup-infer", () => {
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
|
it("should skip infer tests on windows", () => {
|
||||||
|
expect(true).toBe(true)
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +22,12 @@ describe("setup-infer", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should setup infer", async () => {
|
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)
|
const { binDir } = await setupInfer(getVersion("infer", "true"), directory, process.arch)
|
||||||
await testBin("infer", ["--version"], binDir)
|
await testBin("infer", ["--version"], binDir)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue