From bd4f58a83042c29dd61102723012cfae2253024f Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 16 Jan 2024 16:11:37 +0000 Subject: [PATCH] Fix CI and simplify matrix (#2230) --- .github/workflows/sentry_delayed_job_test.yml | 11 +++-- .../workflows/sentry_opentelemetry_test.yml | 6 +-- .github/workflows/sentry_rails_test.yml | 43 ++++++++-------- .github/workflows/sentry_raven_test.yml | 49 +++++++++---------- .github/workflows/sentry_resque_test.yml | 6 +-- .github/workflows/sentry_ruby_test.yml | 19 ++----- .github/workflows/sentry_sidekiq_test.yml | 21 ++++---- 7 files changed, 67 insertions(+), 88 deletions(-) diff --git a/.github/workflows/sentry_delayed_job_test.yml b/.github/workflows/sentry_delayed_job_test.yml index 522830e2b..7dd628a6d 100644 --- a/.github/workflows/sentry_delayed_job_test.yml +++ b/.github/workflows/sentry_delayed_job_test.yml @@ -24,21 +24,24 @@ jobs: run: working-directory: sentry-delayed_job name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} - os: [ubuntu-latest] include: - { - os: ubuntu-latest, ruby_version: "3.2", options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal", }, } - - { os: ubuntu-latest, ruby_version: "3.2", options: { codecov: 1 } } + - { ruby_version: "3.2", options: { codecov: 1 } } + exclude: + # Because Rails 7.0 currently doesn't work with Ruby head + # LoadError: + # cannot load such file -- mutex_m + - { ruby_version: "head" } steps: - uses: actions/checkout@v1 - name: Install sqlite diff --git a/.github/workflows/sentry_opentelemetry_test.yml b/.github/workflows/sentry_opentelemetry_test.yml index 613f71fc5..f67dfca56 100644 --- a/.github/workflows/sentry_opentelemetry_test.yml +++ b/.github/workflows/sentry_opentelemetry_test.yml @@ -24,22 +24,20 @@ jobs: run: working-directory: sentry-opentelemetry name: Ruby ${{ matrix.ruby_version }} & OpenTelemetry ${{ matrix.opentelemetry_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} # opentelemetry_version: [1.2.0] - os: [ubuntu-latest] include: - { - os: ubuntu-latest, ruby_version: 3.2, options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal", }, } - - { os: ubuntu-latest, ruby_version: 3.2, options: { codecov: 1 } } + - { ruby_version: 3.2, options: { codecov: 1 } } steps: - uses: actions/checkout@v1 diff --git a/.github/workflows/sentry_rails_test.yml b/.github/workflows/sentry_rails_test.yml index 886142684..db295d579 100644 --- a/.github/workflows/sentry_rails_test.yml +++ b/.github/workflows/sentry_rails_test.yml @@ -18,35 +18,33 @@ jobs: run: working-directory: sentry-rails name: Ruby ${{ matrix.ruby_version }} & Rails ${{ matrix.rails_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: rails_version: [6.1.0, 7.0.0, 7.1.0] ruby_version: [2.7, "3.0", "3.1", "3.2", "3.3"] - os: [ubuntu-latest] include: - - { os: ubuntu-latest, ruby_version: "2.4", rails_version: 5.0.0 } - - { os: ubuntu-latest, ruby_version: "2.4", rails_version: 5.1.0 } - - { os: ubuntu-latest, ruby_version: "2.4", rails_version: 5.2.0 } - - { os: ubuntu-latest, ruby_version: "2.5", rails_version: 5.0.0 } - - { os: ubuntu-latest, ruby_version: "2.5", rails_version: 5.1.0 } - - { os: ubuntu-latest, ruby_version: "2.5", rails_version: 5.2.0 } - - { os: ubuntu-latest, ruby_version: "2.5", rails_version: 6.0.0 } - - { os: ubuntu-latest, ruby_version: "2.5", rails_version: 6.1.0 } - - { os: ubuntu-latest, ruby_version: "2.6", rails_version: 5.0.0 } - - { os: ubuntu-latest, ruby_version: "2.6", rails_version: 5.1.0 } - - { os: ubuntu-latest, ruby_version: "2.6", rails_version: 5.2.0 } - - { os: ubuntu-latest, ruby_version: "2.6", rails_version: 6.0.0 } - - { os: ubuntu-latest, ruby_version: "2.6", rails_version: 6.1.0 } - - { os: ubuntu-latest, ruby_version: "2.7", rails_version: 5.0.0 } - - { os: ubuntu-latest, ruby_version: "2.7", rails_version: 5.1.0 } - - { os: ubuntu-latest, ruby_version: "2.7", rails_version: 5.2.0 } - - { os: ubuntu-latest, ruby_version: "2.7", rails_version: 6.0.0 } - - { os: ubuntu-latest, ruby_version: "2.7", rails_version: 6.1.0 } - - { os: ubuntu-latest, ruby_version: "jruby", rails_version: 6.1.0 } + - { ruby_version: "2.4", rails_version: 5.0.0 } + - { ruby_version: "2.4", rails_version: 5.1.0 } + - { ruby_version: "2.4", rails_version: 5.2.0 } + - { ruby_version: "2.5", rails_version: 5.0.0 } + - { ruby_version: "2.5", rails_version: 5.1.0 } + - { ruby_version: "2.5", rails_version: 5.2.0 } + - { ruby_version: "2.5", rails_version: 6.0.0 } + - { ruby_version: "2.5", rails_version: 6.1.0 } + - { ruby_version: "2.6", rails_version: 5.0.0 } + - { ruby_version: "2.6", rails_version: 5.1.0 } + - { ruby_version: "2.6", rails_version: 5.2.0 } + - { ruby_version: "2.6", rails_version: 6.0.0 } + - { ruby_version: "2.6", rails_version: 6.1.0 } + - { ruby_version: "2.7", rails_version: 5.0.0 } + - { ruby_version: "2.7", rails_version: 5.1.0 } + - { ruby_version: "2.7", rails_version: 5.2.0 } + - { ruby_version: "2.7", rails_version: 6.0.0 } + - { ruby_version: "2.7", rails_version: 6.1.0 } + - { ruby_version: "jruby", rails_version: 6.1.0 } - { - os: ubuntu-latest, ruby_version: "3.2", rails_version: 7.1.0, options: @@ -55,7 +53,6 @@ jobs: }, } - { - os: ubuntu-latest, ruby_version: "3.2", rails_version: 7.1.0, options: { codecov: 1 }, diff --git a/.github/workflows/sentry_raven_test.yml b/.github/workflows/sentry_raven_test.yml index 66f116cb5..c1732dd85 100644 --- a/.github/workflows/sentry_raven_test.yml +++ b/.github/workflows/sentry_raven_test.yml @@ -7,8 +7,8 @@ on: - master pull_request: paths: - - 'sentry-raven/**' - - '.github/workflows/sentry_raven_test.yml' + - "sentry-raven/**" + - ".github/workflows/sentry_raven_test.yml" # Cancel in progress workflows on pull_requests. # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value concurrency: @@ -20,14 +20,13 @@ jobs: run: working-directory: sentry-raven name: Test on ruby ${{ matrix.ruby_version }} and rails ${{ matrix.rails_version }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: rails_version: [0, 4.2, 5.2, 6.0.0] - ruby_version: [2.3, 2.4, 2.5, 2.6, 2.7, '3.0', jruby-9.3] - os: [ubuntu-latest] + ruby_version: [2.3, 2.4, 2.5, 2.6, 2.7, "3.0", jruby-9.3] include: - - ruby_version: '3.0' + - ruby_version: "3.0" rails_version: 0 - ruby_version: 2.7 rails_version: 6.0.0 @@ -41,30 +40,30 @@ jobs: rails_version: 4.2 - ruby_version: jruby-9.3 rails_version: 4.2 - - ruby_version: '3.0' + - ruby_version: "3.0" rails_version: 4.2 - - ruby_version: '3.0' + - ruby_version: "3.0" rails_version: 5.2 - - ruby_version: '3.0' + - ruby_version: "3.0" rails_version: 6.0.0 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 - - name: Set up Ruby ${{ matrix.ruby_version }} - uses: ruby/setup-ruby@v1 - with: - bundler: 1 - ruby-version: ${{ matrix.ruby_version }} + - name: Set up Ruby ${{ matrix.ruby_version }} + uses: ruby/setup-ruby@v1 + with: + bundler: 1 + ruby-version: ${{ matrix.ruby_version }} - - name: Start Redis - uses: supercharge/redis-github-action@1.1.0 - with: - redis-version: 5 + - name: Start Redis + uses: supercharge/redis-github-action@1.1.0 + with: + redis-version: 5 - - name: Build with Rails ${{ matrix.rails_version }} - env: - RAILS_VERSION: ${{ matrix.rails_version }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + - name: Build with Rails ${{ matrix.rails_version }} + env: + RAILS_VERSION: ${{ matrix.rails_version }} + run: | + bundle install --jobs 4 --retry 3 + bundle exec rake diff --git a/.github/workflows/sentry_resque_test.yml b/.github/workflows/sentry_resque_test.yml index 7f1593406..fb5c9f12e 100644 --- a/.github/workflows/sentry_resque_test.yml +++ b/.github/workflows/sentry_resque_test.yml @@ -24,21 +24,19 @@ jobs: run: working-directory: sentry-resque name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} - os: [ubuntu-latest] include: - { - os: ubuntu-latest, ruby_version: "3.2", options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal", }, } - - { os: ubuntu-latest, ruby_version: "3.2", options: { codecov: 1 } } + - { ruby_version: "3.2", options: { codecov: 1 } } steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby_version }} diff --git a/.github/workflows/sentry_ruby_test.yml b/.github/workflows/sentry_ruby_test.yml index 06e3ee063..8b62ce438 100644 --- a/.github/workflows/sentry_ruby_test.yml +++ b/.github/workflows/sentry_ruby_test.yml @@ -24,28 +24,16 @@ jobs: run: working-directory: sentry-ruby name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} rack_version: [2.0, 3.0] redis_rb_version: [4.0] - os: [ubuntu-latest] include: + - { ruby_version: 3.2, rack_version: 0, redis_rb_version: 5.0 } + - { ruby_version: 3.2, rack_version: 2.0, redis_rb_version: 5.0 } - { - os: ubuntu-latest, - ruby_version: 3.2, - rack_version: 0, - redis_rb_version: 5.0, - } - - { - os: ubuntu-latest, - ruby_version: 3.2, - rack_version: 2.0, - redis_rb_version: 5.0, - } - - { - os: ubuntu-latest, ruby_version: 3.2, rack_version: 3.0, redis_rb_version: 5.0, @@ -55,7 +43,6 @@ jobs: }, } - { - os: ubuntu-latest, ruby_version: 3.2, rack_version: 3.0, redis_rb_version: 5.0, diff --git a/.github/workflows/sentry_sidekiq_test.yml b/.github/workflows/sentry_sidekiq_test.yml index c958f9702..f7afe3aa0 100644 --- a/.github/workflows/sentry_sidekiq_test.yml +++ b/.github/workflows/sentry_sidekiq_test.yml @@ -18,23 +18,21 @@ jobs: run: working-directory: sentry-sidekiq name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }} - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: matrix: sidekiq_version: ["5.0", "6.0", "7.0"] ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", jruby] - os: [ubuntu-latest] include: - - { os: ubuntu-latest, ruby_version: 2.4, sidekiq_version: 5.0 } - - { os: ubuntu-latest, ruby_version: 2.5, sidekiq_version: 5.0 } - - { os: ubuntu-latest, ruby_version: 2.5, sidekiq_version: 6.0 } - - { os: ubuntu-latest, ruby_version: 2.6, sidekiq_version: 5.0 } - - { os: ubuntu-latest, ruby_version: 2.6, sidekiq_version: 6.0 } - - { os: ubuntu-latest, ruby_version: jruby, sidekiq_version: 5.0 } - - { os: ubuntu-latest, ruby_version: jruby, sidekiq_version: 6.0 } - - { os: ubuntu-latest, ruby_version: jruby, sidekiq_version: 7.0 } + - { ruby_version: 2.4, sidekiq_version: 5.0 } + - { ruby_version: 2.5, sidekiq_version: 5.0 } + - { ruby_version: 2.5, sidekiq_version: 6.0 } + - { ruby_version: 2.6, sidekiq_version: 5.0 } + - { ruby_version: 2.6, sidekiq_version: 6.0 } + - { ruby_version: jruby, sidekiq_version: 5.0 } + - { ruby_version: jruby, sidekiq_version: 6.0 } + - { ruby_version: jruby, sidekiq_version: 7.0 } - { - os: ubuntu-latest, ruby_version: "3.2", sidekiq_version: 7.0, options: @@ -43,7 +41,6 @@ jobs: }, } - { - os: ubuntu-latest, ruby_version: "3.2", sidekiq_version: 7.0, options: { codecov: 1 },