Skip to content

Commit

Permalink
Switch to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBr committed Dec 21, 2020
1 parent 2497b60 commit e9c8b55
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 40 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Rubocop

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rake rubocop
31 changes: 31 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Specs

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
spec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.5', '2.6', '2.7', 'head' ]
rails: [ 'gemfiles/Gemfile.rails-6.1.x', 'gemfiles/Gemfile.rails-6.0.x', 'gemfiles/Gemfile.rails-5.2.x']
exclude:
- { ruby: '2.7', rails: 'gemfiles/Gemfile.rails-5.2.x' }
- { ruby: 'head', rails: 'gemfiles/Gemfile.rails-5.2.x' }
- { ruby: '2.5', rails: 'gemfiles/Gemfile.rails-6.0.x' }
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
env:
BUNDLE_GEMFILE: ${{ matrix.rails }}
name: Ruby ${{ matrix.ruby }} ${{ matrix.rails }} specs
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions gemfiles/Gemfile.rails-6.0.x
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gem 'actionpack', '~> 6.0.0'
gem 'activesupport', '~> 6.0.0'
gem 'activemodel', '~> 6.0.0'
gem 'sqlite3', '~> 1.4'
# FIXME: https://github.com/rspec/rspec-rails/issues/2177
gem 'rspec-rails', '~> 4.0.0.beta2'
gem 'rspec-rails'

gemspec :path => '../'
9 changes: 9 additions & 0 deletions gemfiles/Gemfile.rails-6.1.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source "https://rubygems.org"

gem 'actionpack', '~> 6.1.0'
gem 'activesupport', '~> 6.1.0'
gem 'activemodel', '~> 6.1.0'
gem 'sqlite3', '~> 1.4'
gem 'rspec-rails'

gemspec :path => '../'
6 changes: 3 additions & 3 deletions spec/requests/action_controller_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
view: be_between(1, 30),
db: be_between(1, 30),
controller: be_between(1, 30)
view: be_between(1, 500),
db: be_between(1, 500),
controller: be_between(1, 500)
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/action_view_collection_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
additional_value: :value,
count: 3,
request_id: :request_id,
value: be_between(1, 30)
value: be_between(1, 500)
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/action_view_partial_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
value: be_between(1, 30)
value: be_between(1, 500)
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/action_view_template_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
value: be_between(1, 30)
value: be_between(1, 500)
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/active_record_instantiation_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
value: be_between(1, 30),
value: be_between(1, 500),
record_count: 1
)
)
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/active_record_sql_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
value: be_between(1, 30),
value: be_between(1, 500),
sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)"
)
)
Expand All @@ -58,7 +58,7 @@
values: a_hash_including(
additional_value: :value,
request_id: :request_id,
value: be_between(1, 30),
value: be_between(1, 500),
sql: "INSERT INTO \"metrics\" (\"name\", \"created_at\", \"updated_at\") VALUES (xxx)"
)
)
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/block_inistrumentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
additional_value: :value,
request_id: :request_id,
block_value: :block_value,
value: be_between(1, 30)
value: be_between(1, 500)
)
)
end
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
end

config.include ActiveSupport::Testing::TimeHelpers
config.include ActiveSupport::Testing::Assertions
config.include ActiveJob::TestHelper

config.include InfluxDB::Rails::BrokenClient
Expand Down

0 comments on commit e9c8b55

Please sign in to comment.