From 9b92ff79c566d323ae01c8c41e7103ac6059dd8b Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 12 Jun 2020 16:24:49 -0600 Subject: Clean up build scripts --- Rakefile | 2 +- bin/cibuild | 15 +++++++-------- bin/lint | 3 --- bin/setup | 5 ++--- bin/test | 10 ---------- 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/Rakefile b/Rakefile index 64ea11f..f5bff96 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ require 'rubocop/rake_task' Rake::TestTask.new(:test) do |t| t.libs << 'test' - t.libs << 'lib' + t.verbose = true t.test_files = FileList['test/**/*_test.rb'] end RuboCop::RakeTask.new(:rubocop) diff --git a/bin/cibuild b/bin/cibuild index a212da4..4990224 100755 --- a/bin/cibuild +++ b/bin/cibuild @@ -1,15 +1,10 @@ #!/bin/sh -# script/cibuild: Setup environment for CI to run tests. This is primarily -# designed to run on the continuous integration server. - set -e +[ -z "$DEBUG" ] || set -x 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 @@ -17,7 +12,11 @@ export RUBY_HEAP_SLOTS_INCREMENT=400000 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 export CIBUILD=1 -ruby -v -gem install bundler:2.0.1 --conservative +echo "[$(date "+%H:%M:%S")] ==> Running setup…" +bin/setup + +echo "[$(date "+%H:%M:%S")] ==> Running tests…" bin/test + +echo "[$(date "+%H:%M:%S")] ==> Running linters…" bin/lint diff --git a/bin/lint b/bin/lint index c9ece35..054c5c8 100755 --- a/bin/lint +++ b/bin/lint @@ -2,7 +2,4 @@ set -e -[ -z "$DEBUG" ] || set -x - -echo [$(date "+%H:%M:%S")] "==> Running linters…" bundle exec rake lint diff --git a/bin/setup b/bin/setup index dce67d8..1c303f4 100755 --- a/bin/setup +++ b/bin/setup @@ -1,8 +1,7 @@ #!/usr/bin/env bash set -euo pipefail IFS=$'\n\t' -set -vx +ruby -v +gem install bundler -v '~> 2.0' bundle install - -# Do any other automated setup that you need to do here diff --git a/bin/test b/bin/test index 7b58776..e058fc5 100755 --- a/bin/test +++ b/bin/test @@ -1,17 +1,7 @@ #!/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 -- cgit v1.2.3