-
-
Notifications
You must be signed in to change notification settings - Fork 520
Apply bundler-cache to CI's Ruby setup #2204
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,29 +21,36 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| ruby_version: [2.6, 2.7, '3.0', '3.1', '3.2', jruby] | ||
| ruby_version: [2.6, 2.7, "3.0", "3.1", "3.2", jruby] | ||
| # 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: | ||
| { | ||
| rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal", | ||
| }, | ||
| } | ||
| - { os: ubuntu-latest, ruby_version: 3.2, options: { codecov: 1 } } | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v1 | ||
|
|
||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@8ddb7b3348b3951590db24c346e94ebafdabc926 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler: "2.3" | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler-cache: true | ||
|
|
||
| - name: Run specs | ||
| env: | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
| - name: Run specs | ||
| env: | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
|
|
||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ jobs: | |
| 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'] | ||
| ruby_version: [2.7, "3.0", "3.1", "3.2"] | ||
| os: [ubuntu-latest] | ||
| include: | ||
| - { os: ubuntu-latest, ruby_version: "2.4", rails_version: 5.0.0 } | ||
|
|
@@ -61,30 +61,27 @@ jobs: | |
| options: { codecov: 1 }, | ||
| } | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Install sqlite and ImageMagick | ||
| run: | | ||
| # See https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/td-p/41122/page/2 | ||
| for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | ||
| sudo apt-get update | ||
| sudo apt-get install libsqlite3-dev imagemagick | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler: "2.3" | ||
| # rails 7.1.0 requires latest rubygems | ||
| # but 3.5.0 dropped ruby 2.7 so we need to pin to something that works for all our shit | ||
| rubygems: ${{ matrix.rails_version == '7.1.0' && '3.4.22' || 'default' }} | ||
| - uses: actions/checkout@v1 | ||
| - name: Install sqlite and ImageMagick | ||
| run: | | ||
| # See https://github.community/t5/GitHub-Actions/ubuntu-latest-Apt-repository-list-issues/td-p/41122/page/2 | ||
| for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | ||
| sudo apt-get update | ||
| sudo apt-get install libsqlite3-dev imagemagick | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler-cache: true | ||
|
|
||
| - name: Build with Rails ${{ matrix.rails_version }} | ||
| env: | ||
| RAILS_VERSION: ${{ matrix.rails_version }} | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
| - name: Build with Rails ${{ matrix.rails_version }} | ||
| env: | ||
| RAILS_VERSION: ${{ matrix.rails_version }} | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
|
|
||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,31 +21,38 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| ruby_version: [2.4, 2.5, 2.6, 2.7, '3.0', '3.1', '3.2', jruby] | ||
| ruby_version: [2.4, 2.5, 2.6, 2.7, "3.0", "3.1", "3.2", jruby] | ||
| 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 } } | ||
| - { | ||
| 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 } } | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler: "2.3" | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler-cache: true | ||
|
|
||
| - 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 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| redis-version: 5 | ||
|
|
||
| - name: Run specs | ||
| env: | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
| - name: Run specs | ||
| env: | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| bundle exec rake | ||
|
|
||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,8 @@ jobs: | |
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| sidekiq_version: ['5.0', '6.0', '7.0'] | ||
| ruby_version: ['2.7', '3.0', '3.1', '3.2', jruby] | ||
| sidekiq_version: ["5.0", "6.0", "7.0"] | ||
| ruby_version: ["2.7", "3.0", "3.1", "3.2", jruby] | ||
| os: [ubuntu-latest] | ||
| include: | ||
| - { os: ubuntu-latest, ruby_version: 2.4, sidekiq_version: 5.0 } | ||
|
|
@@ -33,30 +33,43 @@ jobs: | |
| - { 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 } | ||
| - { os: ubuntu-latest, ruby_version: '3.2', sidekiq_version: 7.0, options: { rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal" } } | ||
| - { os: ubuntu-latest, ruby_version: '3.2', sidekiq_version: 7.0, options: { codecov: 1 } } | ||
| - { | ||
| os: ubuntu-latest, | ||
| ruby_version: "3.2", | ||
| sidekiq_version: 7.0, | ||
| options: | ||
| { | ||
| rubyopt: "--enable-frozen-string-literal --debug=frozen-string-literal", | ||
| }, | ||
| } | ||
| - { | ||
| os: ubuntu-latest, | ||
| ruby_version: "3.2", | ||
| sidekiq_version: 7.0, | ||
| options: { codecov: 1 }, | ||
| } | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v1 | ||
|
|
||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler: "2.3" | ||
| - name: Set up Ruby ${{ matrix.ruby_version }} | ||
| uses: ruby/setup-ruby@v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| ruby-version: ${{ matrix.ruby_version }} | ||
| bundler-cache: true | ||
|
|
||
| - name: Start Redis | ||
| uses: supercharge/redis-github-action@1.1.0 | ||
| with: | ||
| redis-version: ${{ matrix.sidekiq_version == '7.0' && 6 || 5 }} | ||
| - name: Start Redis | ||
| uses: supercharge/redis-github-action@1.1.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| redis-version: ${{ matrix.sidekiq_version == '7.0' && 6 || 5 }} | ||
|
|
||
| - name: Run specs with Sidekiq ${{ matrix.sidekiq_version }} | ||
| env: | ||
| SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }} | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| make test | ||
| - name: Run specs with Sidekiq ${{ matrix.sidekiq_version }} | ||
| env: | ||
| SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }} | ||
| RUBYOPT: ${{ matrix.options.rubyopt }} | ||
| run: | | ||
| bundle install --jobs 4 --retry 3 | ||
| make test | ||
|
|
||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
| - name: Upload Coverage | ||
| if: ${{ matrix.options.codecov }} | ||
| uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.