summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormo <mo@mokhan.ca>2018-05-07 16:16:53 -0600
committermo <mo@mokhan.ca>2018-05-07 16:16:53 -0600
commit31500bdab2e72b370d7e622195161df2515fdf4f (patch)
tree4b4810e79eb6e5962986f8efca45a62d6899cf79 /bin
parent94930e58756679db7803e7fd59664f696689388d (diff)
hook up CI.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cibuild22
-rwxr-xr-xbin/console7
-rwxr-xr-xbin/lint8
-rwxr-xr-xbin/test17
4 files changed, 51 insertions, 3 deletions
diff --git a/bin/cibuild b/bin/cibuild
new file mode 100755
index 0000000..c373497
--- /dev/null
+++ b/bin/cibuild
@@ -0,0 +1,22 @@
+#!/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
diff --git a/bin/console b/bin/console
index 7d642f3..3a6e116 100755
--- a/bin/console
+++ b/bin/console
@@ -1,7 +1,8 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
-require "bundler/setup"
-require "net/hippie"
+require 'bundler/setup'
+require 'net/hippie'
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "net/hippie"
# require "pry"
# Pry.start
-require "irb"
+require 'irb'
IRB.start(__FILE__)
diff --git a/bin/lint b/bin/lint
new file mode 100755
index 0000000..c9ece35
--- /dev/null
+++ b/bin/lint
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+[ -z "$DEBUG" ] || set -x
+
+echo [$(date "+%H:%M:%S")] "==> Running linters…"
+bundle exec rake lint
diff --git a/bin/test b/bin/test
new file mode 100755
index 0000000..7b58776
--- /dev/null
+++ b/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 test