@knapsack-pro/core
Version:
Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specif
43 lines (42 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GithubActions = void 0;
const _1 = require(".");
class GithubActions extends _1.CIProviderBase {
static get ciNodeTotal() {
return undefined;
}
static get ciNodeIndex() {
return undefined;
}
static get ciNodeBuildId() {
return process.env.GITHUB_RUN_ID;
}
static get ciNodeRetryCount() {
const runAttempt = process.env.GITHUB_RUN_ATTEMPT;
if (runAttempt) {
const runAttemptNumber = parseInt(runAttempt, 10) - 1;
return String(runAttemptNumber);
}
return undefined;
}
static get commitHash() {
return process.env.GITHUB_SHA;
}
static get branch() {
return process.env.GITHUB_REF || process.env.GITHUB_SHA;
}
static get userSeat() {
return process.env.GITHUB_ACTOR;
}
static get detect() {
return 'GITHUB_ACTIONS' in process.env ? this : null;
}
static get fixedQueueSplit() {
return true;
}
static get ciProvider() {
return 'GitHub Actions';
}
}
exports.GithubActions = GithubActions;