Commit 45300e5

mo <mo.khan@gmail.com>
2018-03-03 18:24:30
add scripts to rule them all.
1 parent 758a602
bin/cibuild
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# script/cibuild: Setup environment for CI to run tests. This is primarily
+#                 designed to run on the continuous integration server.
+
+set -e
+
+cd "$(dirname "$0")/.."
+
+echo [$(date "+%H:%M:%S")] "==> Started at…"
+
+# GC customizations
+export RUBY_GC_MALLOC_LIMIT=79000000
+export RUBY_GC_HEAP_INIT_SLOTS=800000
+export RUBY_HEAP_FREE_MIN=100000
+export RUBY_HEAP_SLOTS_INCREMENT=400000
+export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
+
+ruby -v
+gem install bundler --no-ri --no-rdoc --conservative
+bin/test
bin/lint
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ -z "$DEBUG" ] || set -x
+
+echo [$(date "+%H:%M:%S")] "==> Running setup…"
+bin/setup
+
+echo [$(date "+%H:%M:%S")] "==> Running linters…"
+bundle exec rake lint
bin/setup
@@ -4,5 +4,3 @@ IFS=$'\n\t'
 set -vx
 
 bundle install
-
-# Do any other automated setup that you need to do here
bin/test
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# script/test: Run test suite for application. Optionally pass in a path to an
+#              individual test file to run a single test.
+
+
+set -e
+
+cd "$(dirname "$0")/.."
+
+[ -z "$DEBUG" ] || set -x
+
+echo [$(date "+%H:%M:%S")] "==> Running setup…"
+bin/setup
+
+echo [$(date "+%H:%M:%S")] "==> Running tests…"
+bundle exec rake spec
Rakefile
@@ -4,3 +4,4 @@ require "rspec/core/rake_task"
 RSpec::Core::RakeTask.new(:spec)
 
 task :default => :spec
+task lint: []