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

Redo CI to remove individual gemfiles, Add Rails 7.1 and Ruby 3.3 #1108

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 19 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,29 @@ on: [push, pull_request, workflow_dispatch]

jobs:
tests:
name: Tests with Ruby ${{ matrix.ruby-version }} and Rails ${{ matrix.gemfile }}
name: CI Rails ${{ matrix.rails }} on ${{ matrix.ruby }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am making this shorter, so its easier to see the version on Actions details.
image

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gemfile: ["5.0"]
ruby-version: [2.6]
rails: ["7.1.3", "7.0.8", "6.1.7"]
ruby: ["3.3.0", "3.2.2", "3.1.4", "3.0.6", "2.7.8"]
include:
- gemfile: "5.0"
ruby-version: 2.7
- gemfile: "5.1"
ruby-version: 2.6
- gemfile: "5.1"
ruby-version: 2.7
- gemfile: "5.2"
ruby-version: 2.6
- gemfile: "5.2"
ruby-version: 2.7
- gemfile: "6.0"
ruby-version: 2.6
- gemfile: "6.0"
ruby-version: 2.7
- gemfile: "6.1"
ruby-version: 2.7
- gemfile: "6.1"
ruby-version: '3.0'
- gemfile: "7.0"
ruby-version: 3.1
- gemfile: "7.0"
ruby-version: 3.2
#- rails: "5.0"
# ruby: 2.7.8
- rails: "5.1"
ruby: 2.7.8
- rails: "5.2"
ruby: 2.7.8
- rails: "6.0.6"
ruby: 2.7.8
- rails: "7.0"
ruby: truffleruby

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
WKHTMLTOPDF_BIN: /usr/bin/wkhtmltopdf
RUBY_VERSION: ${{ matrix.ruby }}
RAILS_VERSION: ${{ matrix.rails }}

steps:
- uses: actions/checkout@v3
Expand All @@ -46,11 +36,11 @@ jobs:
sudo apt-get update -y -qq
sudo apt-get install -y wkhtmltopdf

- name: Install Ruby ${{ matrix.ruby-version }}
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests with Ruby ${{ matrix.ruby-version }} and Rails ${{ matrix.gemfile }}
- name: Run tests with Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
run: bundle exec rake
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ test/version_tmp
tmp
*.swp
test/dummy/**/*
gemfiles/*.lock
.DS_Store
.DS_Store
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
source 'https://rubygems.org'

gemspec
# use ENV vars, with default value as fallback for local setup
ruby(ENV['RUBY_VERSION'] || '3.2.2') unless ENV['RUBY_VERSION'] == 'truffleruby'

gem 'bootsnap' # required to run `rake test`
gem 'rails', "~> #{ENV['RAILS_VERSION'] || '7.0'}.0"
gem 'rdoc'
gem 'sprockets', "~> #{ENV['SPROCKETS_VERSION'] || '3.0'}" # v4 strips newlines from assets causing tests to fail
gem 'sprockets-rails'
gem 'sqlite3', '~> 1.4'
gem 'webpacker'
8 changes: 0 additions & 8 deletions gemfiles/5.0.gemfile

This file was deleted.

8 changes: 0 additions & 8 deletions gemfiles/5.1.gemfile

This file was deleted.

9 changes: 0 additions & 9 deletions gemfiles/5.2.gemfile

This file was deleted.

10 changes: 0 additions & 10 deletions gemfiles/6.0.gemfile

This file was deleted.

11 changes: 0 additions & 11 deletions gemfiles/6.1.gemfile

This file was deleted.

11 changes: 0 additions & 11 deletions gemfiles/7.0.gemfile

This file was deleted.

Loading