mirror of
https://github.com/actions/setup-python.git
synced 2025-07-03 08:03:48 +00:00
test implemented
This commit is contained in:
parent
292b71d345
commit
29e63a4476
6 changed files with 91 additions and 17 deletions
26
dist/setup/index.js
vendored
26
dist/setup/index.js
vendored
|
@ -65775,6 +65775,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||
exports.State = void 0;
|
||||
const cache = __importStar(__nccwpck_require__(7799));
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const constants_1 = __nccwpck_require__(8248);
|
||||
var State;
|
||||
(function (State) {
|
||||
State["STATE_CACHE_PRIMARY_KEY"] = "cache-primary-key";
|
||||
|
@ -65794,9 +65795,12 @@ class CacheDistributor {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const { primaryKey, restoreKey } = yield this.computeKeys();
|
||||
if (primaryKey.endsWith('-')) {
|
||||
throw new Error(`No file in ${process.cwd()} matched to [${this.cacheDependencyPath
|
||||
.split('\n')
|
||||
.join(',')}], make sure you have checked out the target repository`);
|
||||
const file = this.packageManager === 'pip'
|
||||
? `${this.cacheDependencyPath
|
||||
.split('\n')
|
||||
.join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}}`
|
||||
: this.cacheDependencyPath.split('\n').join(',');
|
||||
throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`);
|
||||
}
|
||||
const cachePath = yield this.getCacheGlobalDirectories();
|
||||
core.saveState(State.CACHE_PATHS, cachePath);
|
||||
|
@ -65856,6 +65860,19 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath)
|
|||
exports.getCacheDistributor = getCacheDistributor;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 8248:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.CACHE_DEPENDENCY_BACKUP_PATH = void 0;
|
||||
const CACHE_DEPENDENCY_BACKUP_PATH = '**/pyproject.toml';
|
||||
exports.CACHE_DEPENDENCY_BACKUP_PATH = CACHE_DEPENDENCY_BACKUP_PATH;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 5546:
|
||||
|
@ -65904,11 +65921,12 @@ const path = __importStar(__nccwpck_require__(1017));
|
|||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||
const cache_distributor_1 = __importDefault(__nccwpck_require__(8953));
|
||||
const utils_1 = __nccwpck_require__(1314);
|
||||
const constants_1 = __nccwpck_require__(8248);
|
||||
class PipCache extends cache_distributor_1.default {
|
||||
constructor(pythonVersion, cacheDependencyPath = '**/requirements.txt') {
|
||||
super('pip', cacheDependencyPath);
|
||||
this.pythonVersion = pythonVersion;
|
||||
this.cacheDependencyBackupPath = '**/pyproject.toml';
|
||||
this.cacheDependencyBackupPath = constants_1.CACHE_DEPENDENCY_BACKUP_PATH;
|
||||
}
|
||||
getCacheGlobalDirectories() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue