File tree Expand file tree Collapse file tree 10 files changed +93
-16
lines changed
Expand file tree Collapse file tree 10 files changed +93
-16
lines changed Original file line number Diff line number Diff line change 3030 bundler-cache : true
3131
3232 - name : build
33- run : |
34- GEM_NAME=$(ls | grep gemspec | cut -d. -f1)
35- echo "Attempting to build gem $GEM_NAME..."
36- gem build $GEM_NAME
37- if [ $? -eq 0 ]; then
38- echo "Gem built successfully!"
39- else
40- echo "Gem build failed!"
41- exit 1
42- fi
33+ run : script/build
Original file line number Diff line number Diff line change 2222 with :
2323 bundler-cache : true
2424
25+ - name : bootstrap
26+ run : script/bootstrap
27+
2528 - name : lint
26- run : bundle exec rubocop -c .rubocop.yml lib/ test/
29+ run : script/lint
Original file line number Diff line number Diff line change @@ -24,16 +24,19 @@ jobs:
2424 with :
2525 bundler-cache : true
2626
27+ - name : bootstrap
28+ run : script/bootstrap
29+
2730 - name : lint
28- run : bundle exec rubocop -c .rubocop.yml lib/ test/
31+ run : script/lint
2932
3033 - name : test
31- run : bundle exec rake
34+ run : script/test
3235
3336 - name : set GEM_NAME from gemspec
3437 run : echo "GEM_NAME=$(ls | grep gemspec | cut -d. -f1)" >> $GITHUB_ENV
3538
36- # builds the gem and saves the version to GITHUB_ENV
39+ # builds the gem and saves the version to GITHUB_ENV
3740 - name : build
3841 run : echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV
3942
Original file line number Diff line number Diff line change @@ -23,10 +23,12 @@ jobs:
2323 - name : Update .ruby-version with matrix value
2424 run : echo "${{ matrix.ruby_version }}" >| .ruby-version
2525
26- - name : Set up Ruby
27- uses :
ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # [email protected] 26+ -
uses :
ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # [email protected] 2827 with :
2928 bundler-cache : true
3029
30+ - name : bootstrap
31+ run : script/bootstrap
32+
3133 - name : Run tests
3234 run : bundle exec rake
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ spec/reports
1111test /tmp
1212test /version_tmp
1313tmp
14+ bin /
1415
1516# YARD artifacts
1617.yardoc
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e # prevent any kind of script failures
4+
5+ source script/env " $@ "
6+
7+ # bootstrap gem dependencies
8+ if [ " $BUNDLE_WITHOUT " == " " ]; then
9+ echo -e " ${BLUE} Installing Gems for ${PURPLE} development${BLUE} ...${OFF} "
10+ else
11+ echo -e " ${BLUE} Installing Gems for ${GREEN} production${BLUE} ...${OFF} "
12+ fi
13+
14+ # what gets installed is set via the BUNDLE_WITHOUT env var in the script/env file
15+ bundle install --local
16+ bundle binstubs --all
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ source script/env " $@ "
6+
7+ GEM_NAME=$( ls | grep gemspec | cut -d. -f1)
8+ echo " Attempting to build gem $GEM_NAME ..."
9+ gem build $GEM_NAME
10+ if [ $? -eq 0 ]; then
11+ echo " Gem built successfully!"
12+ else
13+ echo " Gem build failed!"
14+ exit 1
15+ fi
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e # prevent any kind of script failures
4+
5+ # COLORS
6+ export OFF=' \033[0m'
7+ export RED=' \033[0;31m'
8+ export GREEN=' \033[0;32m'
9+ export BLUE=' \033[0;34m'
10+ export PURPLE=' \033[0;35m'
11+
12+ # set RUBY_ENV to development (as a default) if not set
13+ : " ${RUBY_ENV:= development} "
14+
15+ export RUBY_ENV
16+
17+ # set the working directory to the root of the project
18+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && cd .. && pwd ) "
19+ export DIR
20+
21+ # set the ruby version to the one specified in the .ruby-version file
22+ [ -z " $RBENV_VERSION " ] && RBENV_VERSION=$( cat " $DIR /.ruby-version" )
23+ export RBENV_VERSION
24+
25+ # set the path to include the rbenv shims if they exist
26+ [ -d " /usr/share/rbenv/shims" ] && export PATH=/usr/share/rbenv/shims:$PATH
27+
28+ shopt -s nocasematch # enable case-insensitive matching
29+ if [[ " $RUBY_ENV " == " production" ]]; then
30+ export BUNDLE_WITHOUT=" development"
31+ fi
32+ shopt -u nocasematch # disable case-insensitive matching
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ source script/env " $@ "
6+
7+ bundle exec rake rubocop
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ source script/env " $@ "
6+
7+ bundle exec rake test
You can’t perform that action at this time.
0 commit comments