mirror of https://github.com/aminya/setup-cpp
test: run setupActionsPython directly
This commit is contained in:
parent
ae4effdd67
commit
2c1f704299
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3,6 +3,7 @@ import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-help
|
||||||
import { getVersion } from "../../default_versions"
|
import { getVersion } from "../../default_versions"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version"
|
||||||
import { isGitHubCI } from "../../utils/env/isci"
|
import { isGitHubCI } from "../../utils/env/isci"
|
||||||
|
import { info } from "../../utils/io/io"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-python", () => {
|
describe("setup-python", () => {
|
||||||
|
@ -13,13 +14,11 @@ describe("setup-python", () => {
|
||||||
|
|
||||||
it("should setup python in GitHub Actions", async () => {
|
it("should setup python in GitHub Actions", async () => {
|
||||||
if (isGitHubCI()) {
|
if (isGitHubCI()) {
|
||||||
const installInfo = await setupPython(
|
info("Installing python in GitHub Actions")
|
||||||
getVersion("python", "true", await ubuntuVersion()),
|
const { setupActionsPython } = await import("../actions_python")
|
||||||
directory,
|
await setupActionsPython(getVersion("python", "true", await ubuntuVersion()), directory, process.arch)
|
||||||
process.arch
|
|
||||||
)
|
|
||||||
|
|
||||||
await testBin("python", ["--version"], installInfo?.binDir)
|
await testBin("python", ["--version"])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export async function setupPython(version: string, setupDir: string, arch: strin
|
||||||
return setupPythonViaSystem(version, setupDir, arch)
|
return setupPythonViaSystem(version, setupDir, arch)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
info("Installing python in GitHub Actions")
|
||||||
const { setupActionsPython } = await import("./actions_python")
|
const { setupActionsPython } = await import("./actions_python")
|
||||||
return setupActionsPython(version, setupDir, arch)
|
return setupActionsPython(version, setupDir, arch)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue