1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-09 21:02:19 +02:00

feat: support reading mise.toml

This commit is contained in:
Jorge Rodriguez 2025-03-13 19:35:00 +01:00
parent 19e4675e06
commit 86322ff86a
No known key found for this signature in database
GPG key ID: A22D46F0D97D588A
5 changed files with 70 additions and 4 deletions

View file

@ -216,6 +216,18 @@ describe('Version from file test', () => {
expect(_fn(toolVersionFilePath)).toEqual(['3.14t-dev']);
}
);
it.each([getVersionInputFromTomlFile, getVersionInputFromFile])(
'Version from mise.toml',
async _fn => {
await io.mkdirP(tempDir);
const filePath = path.join(tempDir, 'mise.toml');
const pythonVersion = '3.8.0';
const fileContent = `[tools]\npython = "${pythonVersion}"`;
fs.writeFileSync(filePath, fileContent);
expect(_fn(filePath)).toEqual([pythonVersion]);
}
);
});
describe('getNextPageUrl', () => {