mirror of
https://github.com/actions/setup-python.git
synced 2025-06-12 15:27:13 +02:00
Fix poetry version (#445)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as cache from '@actions/cache';
|
||||
import * as exec from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
import {getCacheDistributor} from '../src/cache-distributions/cache-factory';
|
||||
import * as utils from './../src/utils';
|
||||
|
||||
@ -37,6 +38,9 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||
// exec spy
|
||||
let getExecOutputSpy: jest.SpyInstance;
|
||||
|
||||
// io spy
|
||||
let whichSpy: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
process.env['RUNNER_OS'] = process.env['RUNNER_OS'] ?? 'linux';
|
||||
|
||||
@ -77,6 +81,8 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||
}
|
||||
);
|
||||
|
||||
whichSpy = jest.spyOn(io, 'which');
|
||||
whichSpy.mockImplementation(() => '/path/to/python');
|
||||
getLinuxOSReleaseInfoSpy = jest.spyOn(utils, 'getLinuxOSReleaseInfo');
|
||||
});
|
||||
|
||||
|
15
__tests__/data/pyproject.toml
Normal file
15
__tests__/data/pyproject.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[tool.poetry]
|
||||
name = "testactiontasks"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
flake8 = "^4.0.1"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
Reference in New Issue
Block a user