Skip to content

Commit

Permalink
Add override for CircleCI node total (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankaj443 authored Dec 5, 2024
1 parent 46870b6 commit 7d47169
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/env/src/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,15 @@ export class PercyEnv {
// parallel total & nonce
get parallel() {
let total = parseInt(this.vars.PERCY_PARALLEL_TOTAL, 10);
if (!Number.isInteger(total)) total = null;

if (this.ci === 'circle') {
total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10);
if (total === null) {
switch (this.ci) {
case 'circle':
total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10);
}
}

if (!Number.isInteger(total)) total = null;

// no nonce if no total
let nonce = total && (() => {
if (this.vars.PERCY_PARALLEL_NONCE) {
Expand Down

0 comments on commit 7d47169

Please sign in to comment.