test: skip powershell installation in GitHub Actions

This commit is contained in:
Amin Yahyaabadi 2022-11-20 18:44:41 -08:00
parent fd436d2ed1
commit 488d899a8f
1 changed files with 6 additions and 0 deletions

View File

@ -1,10 +1,16 @@
import { setupPowershell } from "../powershell" import { setupPowershell } from "../powershell"
import { testBin } from "../../utils/tests/test-helpers" import { testBin } from "../../utils/tests/test-helpers"
import { getVersion } from "../../versions/versions" import { getVersion } from "../../versions/versions"
import ciDetect from "@npmcli/ci-detect"
jest.setTimeout(300000) jest.setTimeout(300000)
describe("setup-powershell", () => { describe("setup-powershell", () => {
it("should setup powershell", async () => { it("should setup powershell", async () => {
if (process.platform === "win32" && ciDetect() == "github-actions") {
// results in errors
return
}
const installInfo = await setupPowershell(getVersion("powershell", undefined), "", process.arch) const installInfo = await setupPowershell(getVersion("powershell", undefined), "", process.arch)
await testBin("pwsh", ["--version"], installInfo.binDir) await testBin("pwsh", ["--version"], installInfo.binDir)