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

Expand CI tests #91

Merged
merged 10 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 18 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby
name: CI

on:
push:
Expand All @@ -10,17 +10,29 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
env:
RAILS_ENV: test
strategy:
fail-fast: false
matrix:
rails:
- "8.0"
- "main"
ruby:
- '3.1'
- '3.3'
- "3.3"
- "3.4"
include:
- rails: "7.2"
ruby: "3.1"
env:
RAILS_ENV: test
RAILS_VERSION: ${{ matrix.rails }}

name: ${{ format('rails-{0} ruby-{1}', matrix.rails, matrix.ruby) }}

steps:
- uses: actions/checkout@v4

- run: rm Gemfile.lock

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
12 changes: 10 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ gem "rake", "~> 13.0"

gem "minitest", "~> 5.0"

gem "rails"
gem "activerecord"
rails_version = ENV.fetch("RAILS_VERSION", "8.0")

rails_constraint = if rails_version == "main"
{github: "rails/rails"}
else
"~> #{rails_version}.0"
end

gem "rails", rails_constraint

gem "sqlite3"
gem "sqlite-ulid", require: "sqlite_ulid"

Expand Down
3 changes: 1 addition & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,10 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
activerecord
minitest (~> 5.0)
net-pop!
oaken!
rails
rails (~> 8.0.0)
rake (~> 13.0)
sqlite-ulid
sqlite3
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.0].define(version: 2024_06_30_172609) do
ActiveRecord::Schema[7.2].define(version: 2024_06_30_172609) do
create_table "accounts", id: :string, default: -> { "ULID()" }, force: :cascade do |t|
t.string "name"
t.datetime "created_at", null: false
Expand Down
2 changes: 2 additions & 0 deletions test/dummy/db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ActiveRecord::Base.logger = Logger.new(STDOUT) if ENV["VERBOSE"] || ENV["CI"]

Oaken.prepare do
defaults name: -> { "Shouldn't be used for users.name" }, title: -> { "Global Default Title" }

Expand Down
Loading