Improve test suite and CI run performance (#1796)
* Simplify test I came across this test because it was failing JRuby CI runs. I should emphasize, though, that this test was only failing due do an upstream bug in Nokogiri v1.12.5. When I was reviewing the test, to understand why it was failing at all, I noticed that the assertion was rather obfuscated. Specifically, we were post-processing the entire `response.body` and using that as an expectation. * Use an older version of Nokogiri in our test env This is a temporary fix. See the commit diff for more information. * Split JRuby CI runs from MRI CI runs We can improve the performance of our MRI test runs by not installing Java as part of their run. (Java is only required for JRuby.) * Use latest Ruby patch versions during CI runs * Simplify GitHub Action workflow steps Judging by the output in the GitHub Actions workflow UI, the `echo` steps were not providing much value to us. We can get rid of them to slightly increase run performance. I've also named the other steps to make it easier to skim the Actions workflow output. * Remove `twitter_cldr` development dependency This is no longer being used. * Change GitHub Actions workflow Ruby matrix We can drop Ruby 2.4 from our test run matrix. It is beyond EOL. Let's add 2.7 instead.
This commit is contained in:
+27
-10
@@ -1,29 +1,46 @@
|
||||
name: Ruby Build
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
jruby_build:
|
||||
name: JRuby (${{ matrix.ruby }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [2.4.0, 2.6.0, 3.0.0, jruby-9.2.18.0]
|
||||
ruby: [jruby-9.2.18]
|
||||
steps:
|
||||
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
|
||||
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
|
||||
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
|
||||
- run: echo "The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ github.workspace }}
|
||||
- uses: actions/setup-java@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '11'
|
||||
- uses: ruby/setup-ruby@v1
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
- name: exec rake
|
||||
- name: Run tests
|
||||
run: bundle exec rake
|
||||
mri_build:
|
||||
name: Ruby (${{ matrix.ruby }})
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [2.6, 2.7, 3.0]
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ github.workspace }}
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
- name: Run tests
|
||||
run: bundle exec rake
|
||||
|
||||
Reference in New Issue
Block a user