Commit fca712b

mo khan <mo.khan@gmail.com>
2021-02-04 18:29:49
chore: split lint into style and audit
1 parent d1881b9
.github/workflows/ci.yml
@@ -18,9 +18,9 @@ jobs:
         with:
           ruby-version: ${{ matrix.ruby-version }}
           bundler-cache: true
-      - name: Run tests
+      - name: Running tests…
         run: sh bin/test
-  lint:
+  style:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
@@ -29,5 +29,5 @@ jobs:
         with:
           ruby-version: '2.7'
           bundler-cache: true
-      - name: Run linters
-        run: sh bin/lint
+      - name: Running style checks…
+        run: sh bin/style
bin/audit
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+[ -z "$DEBUG" ] || set -x
+
+echo [$(date "+%H:%M:%S")] "==> Running audit…"
+bundle exec rake bundle:audit
bin/cibuild
@@ -1,21 +0,0 @@
-#!/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 --conservative -v '~> 2.0'
-bin/test
bin/lint
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-
-[ -z "$DEBUG" ] || set -x
-
-echo [$(date "+%H:%M:%S")] "==> Running linters…"
-bundle exec rake lint
bin/setup
@@ -1,6 +1,8 @@
-#!/usr/bin/env bash
+#!/bin/sh
+
 set -euo pipefail
-IFS=$'\n\t'
-set -vx
 
-bundle check || bundle install --jobs "$(sysctl -n hw.ncpu || nproc)"
+cd "$(dirname "$0")/.."
+
+ruby -v
+bundle check || bundle install
bin/style
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -e
+cd "$(dirname "$0")/.."
+
+bundle exec rake rubocop
bin/test
@@ -4,7 +4,4 @@ set -e
 
 cd "$(dirname "$0")/.."
 
-[ -z "$DEBUG" ] || set -x
-
-echo [$(date "+%H:%M:%S")] "==> Running tests…"
-bundle exec rake spec
+bundle exec rspec "$@"
Rakefile
@@ -9,5 +9,4 @@ RSpec::Core::RakeTask.new(:spec)
 RuboCop::RakeTask.new(:rubocop)
 Bundler::Audit::Task.new
 
-task lint: [:rubocop, 'bundle:audit']
 task default: :spec