mirror of https://github.com/status-im/consul.git
Shuffle CICD tests to spread worker load. (#19501)
This commit is contained in:
parent
6f4e037621
commit
395d32e5ad
|
@ -6,6 +6,6 @@ set -euo pipefail
|
|||
export RUNNER_COUNT=$1
|
||||
|
||||
# set matrix var to list of unique packages containing tests
|
||||
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | jq --slurp --compact-output '.' | jq --argjson runnercount $RUNNER_COUNT -cM '[_nwise(length / $runnercount | floor)]'))"
|
||||
matrix="$(go list -json="ImportPath,TestGoFiles" ./... | jq --compact-output '. | select(.TestGoFiles != null) | .ImportPath' | shuf | jq --slurp --compact-output '.' | jq --argjson runnercount $RUNNER_COUNT -cM '[_nwise(length / $runnercount | floor)]'))"
|
||||
|
||||
echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
|
||||
|
|
Loading…
Reference in New Issue