Sha256: d5b74cd12a8f1fa17b6651cb0ecf501f4d5e5b85c208a3b8d883df627df9d391

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

#!/bin/bash

i=0
files=()

BLACK="\033[30m"
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
PINK="\033[35m"
CYAN="\033[36m"
WHITE="\033[37m"
NORMAL="\033[0;39m"

JOBS=${CI_PARALLEL_JOBS:-1}
JOB_NUMBER=${CI_PARALLEL_JOB_NUMBER:-0}

for file in $(find ./spec -name "*_spec.rb" | sort)
do
  if [ $(($i % $JOBS)) -eq $JOB_NUMBER ]
  then
    files+=" $file"
  fi
  ((i++))
done

echo -e "${GREEN}Parallel running $((${JOB_NUMBER} + 1)) of ${JOBS} ${NORMAL}"
echo "bundle exec spinach $@ ${files[@]}"
exec bundle exec spinach $@ ${files[@]}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vx-builder-0.5.11 bin/vx_parallel_spinach