diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 000000000..21d167db6 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,40 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Ruby +on: [push, pull_request] +jobs: + test: + strategy: + fail-fast: false + matrix: + ruby: + - 2.7.0 + - 2.6.5 + - 2.5.7 + - jruby-9.1.17.0 + gemfile: + # These have webpacker: + - rails_5.2_no_sprockets + - rails_5.2_no_sprockets_webpacker_3 + - rails_5.2_no_sprockets_webpacker_4 + # These don't have webpacker: + - rails_5.2_sprockets_3 + - rails_5.2_sprockets_4 + runs-on: ubuntu-latest + env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + # TODO: Impalement caching + # bundler-cache: true + - run: bundle install + - run: bundle exec rake test