Sha256: 0be3e58dce7f059f95fcaaf7fca0eacaff9bc25d411a91e659970dc704af31a8

Contents?: true

Size: 957 Bytes

Versions: 21

Compression:

Stored size: 957 Bytes

Contents

#!/bin/bash
set -uo pipefail

err=0
trap 'err=1' ERR
trap 'exit 1' SIGINT

function print_header() {
  if [[ ${CI:="0"} == "1" ]]; then
    printf "+++ :kubernetes: %s\n" "${1}"
  else
    printf "\n\n\033[0;35m⎈   %s\033[0m\n" "${1}"
  fi
}

if [[ ${PARALLELISM:=0} -lt 1 ]]; then
  if [[ $(uname) == "Darwin" ]]; then
    num_cpus=$(sysctl -n hw.ncpu)
  else
    num_cpus=$(nproc --all)
  fi

  if [[ $num_cpus -le 2 ]]; then
    PARALLELISM=1
  else
    (( PARALLELISM=num_cpus/2 ))
  fi
fi

if [[ ${CI:="0"} == "1" ]]; then
  echo "--- :ruby: Bundle Install"
  bundle install --jobs 4
fi

print_header "Run CLI Tests"
bundle exec rake cli_test

print_header "Run Unit Tests"
bundle exec rake unit_test

print_header "Run Non-Parallel Integration Tests"
bundle exec rake serial_integration_test

print_header "Run Parallel Integration Tests (MT_CPU=$PARALLELISM)"
PARALLELIZE_ME=1 MT_CPU=$PARALLELISM bundle exec rake integration_test

test $err -eq 0

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
krane-2.3.4 bin/test
krane-2.3.3 bin/test
krane-2.3.2 bin/test
krane-2.3.1 bin/test
krane-2.3.0 bin/test
krane-2.2.0 bin/test
krane-2.1.10 bin/test
krane-2.1.9 bin/test
krane-2.1.8 bin/test
krane-2.1.7 bin/test
krane-2.1.6 bin/test
krane-2.1.5 bin/test
krane-2.1.4 bin/test
krane-2.1.3 bin/test
krane-2.1.2 bin/test
krane-2.1.1 bin/test
krane-2.1.0 bin/test
krane-2.0.0 bin/test
krane-1.1.4 bin/test
krane-1.1.3 bin/test