Skip to content

Commit

Permalink
Delegate GraalPy/PyPy support to actions/setup-python
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Dec 12, 2023
1 parent 8d0c660 commit db03b25
Show file tree
Hide file tree
Showing 9 changed files with 387 additions and 174 deletions.
19 changes: 10 additions & 9 deletions src/__tests__/__snapshots__/main.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`main Build behaior Allow leads to building from source with a message in the debug logs 1`] = `
exports[`main Build behavior Allow leads to building from source with a message in the debug logs 1`] = `
[
[
"CPython version 3.6.x is not supported by actions/setup-python.",
Expand All @@ -14,7 +14,7 @@ exports[`main Build behaior Allow leads to building from source with a message i
]
`;

exports[`main Build behaior Allow leads to building from source with a message in the debug logs 2`] = `
exports[`main Build behavior Allow leads to building from source with a message in the debug logs 2`] = `
[
[
"Builder cache key: CPython3.6.15x64os",
Expand Down Expand Up @@ -76,7 +76,7 @@ exports[`main Build behaior Allow leads to building from source with a message i
]
`;

exports[`main Build behaior Error leads to a failed action with an error message 1`] = `
exports[`main Build behavior Error leads to a failed action with an error message 1`] = `
[
[
"CPython version 3.6.x is not supported by actions/setup-python.
Expand All @@ -86,7 +86,7 @@ exports[`main Build behaior Error leads to a failed action with an error message
]
`;

exports[`main Build behaior Info leads to building from source with a message in the logs 1`] = `
exports[`main Build behavior Info leads to building from source with a message in the logs 1`] = `
[
[
"CPython version 3.6.x is not supported by actions/setup-python.",
Expand All @@ -103,7 +103,7 @@ exports[`main Build behaior Info leads to building from source with a message in
]
`;

exports[`main Build behaior Info leads to building from source with a message in the logs 2`] = `
exports[`main Build behavior Info leads to building from source with a message in the logs 2`] = `
[
[
"Builder cache key: CPython3.6.15x64os",
Expand Down Expand Up @@ -162,7 +162,7 @@ exports[`main Build behaior Info leads to building from source with a message in
]
`;

exports[`main Build behaior Warn leads to building from source with a warning 1`] = `
exports[`main Build behavior Warn leads to building from source with a warning 1`] = `
[
[
"CPython version 3.6.x is not supported by actions/setup-python.
Expand Down Expand Up @@ -217,15 +217,16 @@ Failure in saveCache",
]
`;

exports[`main actions/setup-python result PyPy failure 1`] = `
exports[`main actions/setup-python result handles a failure in version.getSetupPythonResult with CPython 1`] = `
[
[
"This action does not support building PyPy from source",
"Error while resolving setup-python version.
fail actions/setup-python",
],
]
`;

exports[`main actions/setup-python result handles a failure in version.getSetupPythonResult with CPython 1`] = `
exports[`main actions/setup-python result handles a failure in version.getSetupPythonResult with GraalPy 1`] = `
[
[
"Error while resolving setup-python version.
Expand Down
19 changes: 17 additions & 2 deletions src/__tests__/inputs.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const pythonVersions: PythonVersionTest[] = [
},
{
expectedType: PythonType.PyPy,
expectedVersion: '>=3.9.0 <3.10.0-0',
expectedVersion: 'pypy3.9',
inputVersionString: 'pypy3.9'
},
{
Expand All @@ -67,8 +67,23 @@ const pythonVersions: PythonVersionTest[] = [
},
{
expectedType: PythonType.PyPy,
expectedVersion: '>=3.9.0 <3.10.0-0',
expectedVersion: 'pypy-3.9',
inputVersionString: 'pypy-3.9'
},
{
expectedType: PythonType.GraalPy,
expectedVersion: 'graalpy-22.3',
inputVersionString: 'graalpy-22.3'
},
{
expectedType: PythonType.GraalPy,
expectedVersion: 'graalpy22.3',
inputVersionString: 'graalpy22.3'
},
{
expectedType: PythonType.GraalPy,
expectedVersion: 'graalpy-22.3',
inputVersionString: 'Graalpy-22.3'
}
];

Expand Down
Loading

0 comments on commit db03b25

Please sign in to comment.