File tree Expand file tree Collapse file tree 6 files changed +18
-15
lines changed Expand file tree Collapse file tree 6 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 1
1
name : Skunk
2
- on : [push, pull_request ]
2
+ on : [push]
3
3
4
4
jobs :
5
5
skunk :
@@ -11,14 +11,19 @@ jobs:
11
11
uses : actions/setup-ruby@v1
12
12
with :
13
13
ruby-version : 2.6.x
14
+ - name : Run test suite with COVERAGE=true
15
+ run : |
16
+ gem install bundler
17
+ bundle install --jobs 4 --retry 3
18
+ COVERAGE=true bundle exec rake test
14
19
- name : Run Skunk on Project
15
20
run : |
16
21
gem install skunk
17
22
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
18
- if [[ "$CURRENT_BRANCH" -ne "master" ]]; then
23
+ if [[ "$CURRENT_BRANCH" != "master" ]]; then
19
24
echo "Executing within branch: $CURRENT_BRANCH"
20
- skunk lib/
25
+ skunk lib/ -b master
21
26
else
22
27
echo "Executing within master branch"
23
- skunk lib/ -b master
28
+ skunk lib/
24
29
fi
Original file line number Diff line number Diff line change 37
37
sexp_processor (~> 4.8 )
38
38
ice_nine (0.11.2 )
39
39
jaro_winkler (1.5.4 )
40
- json (2.2.0 )
41
40
kwalify (0.7.2 )
42
41
launchy (2.4.3 )
43
42
addressable (~> 2.3 )
80
79
tty-which (~> 0.4.0 )
81
80
virtus (~> 1.0 )
82
81
sexp_processor (4.14.0 )
83
- simplecov (0.17 .1 )
82
+ simplecov (0.18 .1 )
84
83
docile (~> 1.1 )
85
- json (>= 1.8 , < 3 )
86
- simplecov-html (~> 0.10.0 )
84
+ simplecov-html (~> 0.11.0 )
87
85
simplecov-console (0.5.0 )
88
86
ansi
89
87
simplecov
90
88
terminal-table
91
- simplecov-html (0.10.2 )
89
+ simplecov-html (0.11.0 )
92
90
terminal-table (1.8.0 )
93
91
unicode-display_width (~> 1.1 , >= 1.1.1 )
94
92
thread_safe (0.3.6 )
@@ -111,7 +109,7 @@ DEPENDENCIES
111
109
rake (~> 10.0 )
112
110
reek (~> 5.4.0 )
113
111
rubocop (< 1.0 )
114
- simplecov (~> 0.17 .1 )
112
+ simplecov (~> 0.18 .1 )
115
113
simplecov-console (= 0.5.0 )
116
114
skunk !
117
115
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ def analyse_modified_files
30
30
# create a txt file with the branch score details
31
31
def build_details
32
32
details = "Base branch (#{ ::RubyCritic ::Config . base_branch } ) " \
33
- "average stink score: #{ ::RubyCritic ::Config . base_branch_score } \n " \
33
+ "average stink score: #{ ::RubyCritic ::Config . base_branch_score . to_f . round ( 2 ) } \n " \
34
34
"Feature branch (#{ ::RubyCritic ::Config . feature_branch } ) " \
35
- "average stink score: #{ ::RubyCritic ::Config . feature_branch_score } \n "
35
+ "average stink score: #{ ::RubyCritic ::Config . feature_branch_score . to_f . round ( 2 ) } \n "
36
36
Skunk ::Command ::Output . create_directory ( ::RubyCritic ::Config . compare_root_directory )
37
37
File . open ( build_details_path , "w" ) { |file | file . write ( details ) }
38
38
puts details
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ def total_churn_times_cost
64
64
def stink_score_average
65
65
return 0 if analysed_modules_count . zero?
66
66
67
- ( total_stink_score . to_d / analysed_modules_count ) . to_f
67
+ ( total_stink_score . to_d / analysed_modules_count ) . to_f . round ( 2 )
68
68
end
69
69
70
70
def table_options
Original file line number Diff line number Diff line change @@ -46,6 +46,6 @@ Gem::Specification.new do |spec|
46
46
spec . add_development_dependency "rake" , "~> 10.0"
47
47
spec . add_development_dependency "reek" , "~> 5.4.0"
48
48
spec . add_development_dependency "rubocop" , "< 1.0"
49
- spec . add_development_dependency "simplecov" , "~> 0.17 .1"
49
+ spec . add_development_dependency "simplecov" , "~> 0.18 .1"
50
50
spec . add_development_dependency "simplecov-console" , "0.5.0"
51
51
end
Original file line number Diff line number Diff line change 10
10
]
11
11
12
12
SimpleCov . start do
13
- track_files "/ lib/"
13
+ track_files "lib/**/*.rb "
14
14
end
15
15
end
16
16
You can’t perform that action at this time.
0 commit comments