Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only report one test coverage per workflow #1567

Merged
merged 1 commit into from Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/sentry_delayed_job_test.yml
Expand Up @@ -12,15 +12,19 @@ jobs:
defaults:
run:
working-directory: sentry-delayed_job
name: Test on ruby ${{ matrix.ruby_version }}
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
ruby_version: [2.4, 2.5, 2.6, 2.7, '3.0', jruby]
os: [ubuntu-latest]
include:
- ruby_version: '3.0'
env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
- { os: ubuntu-latest, ruby_version: 2.4 }
- { os: ubuntu-latest, ruby_version: 2.5 }
- { os: ubuntu-latest, ruby_version: 2.6 }
- { os: ubuntu-latest, ruby_version: 2.7 }
- { os: ubuntu-latest, ruby_version: '3.0' }
- { os: ubuntu-latest, ruby_version: jruby }
- { os: ubuntu-latest, ruby_version: '3.0', options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } }
- { os: ubuntu-latest, ruby_version: '3.0', options: { codecov: 1 } }
steps:
- uses: actions/checkout@v1
- name: Install sqlite
Expand All @@ -37,6 +41,9 @@ jobs:
ruby-version: ${{ matrix.ruby_version }}

- name: Run specs
env:
RUBYOPT: ${{ matrix.options.rubyopt }}
CODECOV: ${{ matrix.options.codecov }}
run: |
bundle install --jobs 4 --retry 3
bundle exec rake
9 changes: 5 additions & 4 deletions .github/workflows/sentry_rails_test.yml
Expand Up @@ -12,17 +12,16 @@ jobs:
defaults:
run:
working-directory: sentry-rails
name: Test on ruby ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }}
name: Ruby ${{ matrix.ruby_version }} & Rails ${{ matrix.rails_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
rails_version: [5.0.0, 5.1.0, 5.2.0, 6.0.0, 6.1.0]
ruby_version: [2.4, 2.5, 2.6, 2.7, '3.0', jruby]
os: [ubuntu-latest]
include:
- ruby_version: '3.0'
rails_version: 6.1.0
env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
- { os: ubuntu-latest, ruby_version: '3.0', rails_version: 6.1.0, options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } }
- { os: ubuntu-latest, ruby_version: '2.7', rails_version: 6.1.0, options: { codecov: 1 } }
exclude:
- ruby_version: 2.4
rails_version: 6.0.0
Expand Down Expand Up @@ -58,6 +57,8 @@ jobs:
- name: Build with Rails ${{ matrix.rails_version }}
env:
RAILS_VERSION: ${{ matrix.rails_version }}
RUBYOPT: ${{ matrix.options.rubyopt }}
CODECOV: ${{ matrix.options.codecov }}
run: |
bundle install --jobs 4 --retry 3
bundle exec rake
17 changes: 12 additions & 5 deletions .github/workflows/sentry_resque_test.yml
Expand Up @@ -12,15 +12,19 @@ jobs:
defaults:
run:
working-directory: sentry-resque
name: Test on ruby ${{ matrix.ruby_version }}
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
ruby_version: [2.4, 2.5, 2.6, 2.7, '3.0', jruby]
os: [ubuntu-latest]
include:
- ruby_version: '3.0'
env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
- { os: ubuntu-latest, ruby_version: 2.4 }
- { os: ubuntu-latest, ruby_version: 2.5 }
- { os: ubuntu-latest, ruby_version: 2.6 }
- { os: ubuntu-latest, ruby_version: 2.7 }
- { os: ubuntu-latest, ruby_version: '3.0' }
- { os: ubuntu-latest, ruby_version: jruby }
- { os: ubuntu-latest, ruby_version: '3.0', options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } }
- { os: ubuntu-latest, ruby_version: '3.0', options: { codecov: 1 } }
steps:
- uses: actions/checkout@v1
- name: Set up Ruby ${{ matrix.ruby_version }}
Expand All @@ -35,6 +39,9 @@ jobs:
redis-version: 5

- name: Run specs
env:
RUBYOPT: ${{ matrix.options.rubyopt }}
CODECOV: ${{ matrix.options.codecov }}
run: |
bundle install --jobs 4 --retry 3
bundle exec rake
4 changes: 3 additions & 1 deletion .github/workflows/sentry_ruby_test.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
defaults:
run:
working-directory: sentry-ruby
name: Test on ruby ${{ matrix.ruby_version }} with options - ${{ toJson(matrix.options) }}
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -25,6 +25,7 @@ jobs:
- { os: ubuntu-latest, ruby_version: jruby }
- { os: ubuntu-latest, ruby_version: '3.0', options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } }
- { os: ubuntu-latest, ruby_version: '3.0', options: { without_rack: 1 } }
- { os: ubuntu-latest, ruby_version: '3.0', options: { codecov: 1 } }
steps:
- uses: actions/checkout@v1

Expand All @@ -38,6 +39,7 @@ jobs:
env:
RUBYOPT: ${{ matrix.options.rubyopt }}
WITHOUT_RACK: ${{ matrix.options.without_rack }}
CODECOV: ${{ matrix.options.codecov }}
run: |
bundle install --jobs 4 --retry 3
bundle exec rake
8 changes: 5 additions & 3 deletions .github/workflows/sentry_sidekiq_test.yml
Expand Up @@ -12,16 +12,16 @@ jobs:
defaults:
run:
working-directory: sentry-sidekiq
name: Test on ruby ${{ matrix.ruby_version }} and sidekiq ${{ matrix.sidekiq_version }}
name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
sidekiq_version: [5.0, 6.0]
ruby_version: [2.4, 2.5, 2.6, 2.7, '3.0', jruby]
os: [ubuntu-latest]
include:
- ruby_version: '3.0'
env: RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal"
- { os: ubuntu-latest, ruby_version: '3.0', sidekiq_version: 6.0, options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } }
- { os: ubuntu-latest, ruby_version: '2.7', sidekiq_version: 6.0, options: { codecov: 1 } }
exclude:
- ruby_version: 2.4
sidekiq_version: 6.0
Expand All @@ -42,6 +42,8 @@ jobs:
- name: Run specs with Sidekiq ${{ matrix.sidekiq_version }}
env:
SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }}
RUBYOPT: ${{ matrix.options.rubyopt }}
CODECOV: ${{ matrix.options.codecov }}
run: |
bundle install --jobs 4 --retry 3
make test
2 changes: 1 addition & 1 deletion sentry-delayed_job/spec/spec_helper.rb
Expand Up @@ -15,7 +15,7 @@
coverage_dir File.join(__FILE__, "../../coverage")
end

if ENV["CI"]
if ENV["CI"] && ENV["CODECOV"] == "1"
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-rails/spec/spec_helper.rb
Expand Up @@ -12,7 +12,7 @@
coverage_dir File.join(__FILE__, "../../coverage")
end

if ENV["CI"]
if ENV["CI"] && ENV["CODECOV"] == "1"
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-raven/spec/spec_helper.rb
Expand Up @@ -7,7 +7,7 @@
coverage_dir File.join(__FILE__, "../../coverage")
end

if ENV["CI"]
if ENV["CI"] && ENV["CODECOV"] == "1"
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/spec/spec_helper.rb
Expand Up @@ -10,7 +10,7 @@
coverage_dir File.join(__FILE__, "../../coverage")
end

if ENV["CI"]
if ENV["CI"] && ENV["CODECOV"] == "1"
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
Expand Down
2 changes: 1 addition & 1 deletion sentry-sidekiq/spec/spec_helper.rb
Expand Up @@ -16,7 +16,7 @@
coverage_dir File.join(__FILE__, "../../coverage")
end

if ENV["CI"]
if ENV["CI"] && ENV["CODECOV"] == "1"
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
Expand Down