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:
parent
19e4675e06
commit
86322ff86a
5 changed files with 70 additions and 4 deletions
|
@ -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', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue