File tree 8 files changed +90
-28
lines changed
8 files changed +90
-28
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - master
8
+ tags :
9
+ - v*
10
+
11
+ jobs :
12
+ build :
13
+ runs-on : ubuntu-latest
14
+
15
+ strategy :
16
+ matrix :
17
+ ruby :
18
+ - 2.5
19
+ - 2.6
20
+ - 2.7
21
+
22
+ steps :
23
+ - uses : actions/checkout@v2
24
+
25
+ - name : Setup Redis
26
+ uses : shogo82148/actions-setup-redis@v1
27
+ with :
28
+ redis-version : ' 5.x'
29
+
30
+ - name : Set up Ruby
31
+ uses : actions/setup-ruby@v1
32
+ with :
33
+ ruby-version : ${{ matrix.ruby }}
34
+ architecture : ' x64'
35
+
36
+ - name : Setup bundler
37
+ run : |
38
+ gem install bundler --no-doc
39
+ bundle config path vendor/bundle
40
+
41
+ - name : Bundler cache
42
+ uses : actions/cache@v2
43
+ with :
44
+ path : vendor/bundle
45
+ key : ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
46
+ restore-keys : |
47
+ ${{ runner.os }}-gems-
48
+
49
+ - name : Setup gems
50
+ run : bundle install --jobs 4
51
+
52
+ - name : Rubocop
53
+ run : bundle exec rubocop
54
+
55
+ - name : RSpec
56
+ run : bundle exec rspec
57
+
58
+ publish :
59
+ if : contains(github.ref, 'refs/tags/v')
60
+ needs : build
61
+ runs-on : ubuntu-latest
62
+
63
+ steps :
64
+ - uses : actions/checkout@v2
65
+
66
+ - name : Release Gem
67
+ uses : CvX/publish-rubygems-action@master
68
+ env :
69
+ RUBYGEMS_API_KEY : ${{secrets.RUBYGEMS_API_KEY}}
Original file line number Diff line number Diff line change 9
9
Gemfile.lock
10
10
.DS_Store
11
11
* .swp
12
-
13
- .rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
Original file line number Diff line number Diff line change 1
- inherit_from : https://raw.githubusercontent.com/discourse/discourse/master/.rubocop.yml
1
+ inherit_gem :
2
+ rubocop-discourse : default.yml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
1
2
source 'https://rubygems.org'
2
3
3
4
git_source ( :github ) { 'https://github.com/discourse/mini_scheduler' }
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
1
2
# A sample Guardfile
2
3
# More info at https://github.com/guard/guard#readme
3
4
Original file line number Diff line number Diff line change 1
- require "bundler/gem_tasks"
1
+ #!/usr/bin/env rake
2
+ # frozen_string_literal: true
3
+
2
4
require "rspec/core/rake_task"
5
+ require 'bundler'
6
+
7
+ begin
8
+ Bundler . setup :default , :development
9
+ Bundler ::GemHelper . install_tasks
10
+ rescue Bundler ::BundlerError => error
11
+ $stderr. puts error . message
12
+ $stderr. puts "Run `bundle install` to install missing gems"
13
+ exit error . status_code
14
+ end
3
15
4
16
RSpec ::Core ::RakeTask . new ( :spec )
5
17
6
- task default : :spec
18
+ desc "Default: run tests"
19
+ task default : [ :spec ]
Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ Gem::Specification.new do |spec|
15
15
spec . homepage = "https://github.com/discourse/mini_scheduler"
16
16
spec . license = "MIT"
17
17
18
- # Specify which files should be added to the gem when it is released.
19
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20
- spec . files = Dir . chdir ( File . expand_path ( '..' , __FILE__ ) ) do
21
- `git ls-files -z` . split ( "\x0 " ) . reject { |f | f . match ( %r{^(test|spec|features)/} ) }
22
- end
18
+ spec . files = `git ls-files` . split ( $/) . reject { |s | s =~ /^(spec|\. )/ }
23
19
spec . require_paths = [ "lib" ]
24
20
25
21
spec . add_dependency "sidekiq"
@@ -32,4 +28,5 @@ Gem::Specification.new do |spec|
32
28
spec . add_development_dependency "guard-rspec"
33
29
spec . add_development_dependency "mock_redis"
34
30
spec . add_development_dependency "rake"
31
+ spec . add_development_dependency 'rubocop-discourse'
35
32
end
You can’t perform that action at this time.
0 commit comments