Skip to content

Rails 7.1 and gh actions #60

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
53 changes: 53 additions & 0 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "*" ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby_version: ['3.0', '3.1', '3.2', '3.3']
services:
postgres:
image: postgres
ports:
- "5432:5432"
env:
POSTGRES_DB: qc_classic_admin_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set up database schema
run: |
bundle exec rake db:setup
- name: Run tests
run: bundle exec rspec

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Lint Ruby files
run: bundle exec rubocop --parallel
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/queue_classic_admin/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module QueueClassicAdmin
VERSION = "4.0.0.alpha4"
VERSION = "4.0.0.alpha5"
end
2 changes: 1 addition & 1 deletion queue_classic_admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib,vendor}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.md"]
s.test_files = Dir["test/**/*"]

s.add_runtime_dependency "rails", ">= 5.0.0", "< 7.1"

Choose a reason for hiding this comment

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

Maybe we can set smaller supported version to Rails 6.1?.

Also the failed unit tests indicate:

ArgumentError: The `legacy_connection_handling` setter was deprecated in 7.0 and removed in 7.1, but is still defined in your configuration. Please remove this call as it no longer has any effect."

which is defined in application.rb, so we can probably get rid of that line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sebaherrera07 yep, that works - we should only support current versions; I think 6.1.x is the oldest still being patched.

s.add_runtime_dependency "rails", ">= 5.0.0", "< 7.3"
s.add_runtime_dependency "queue_classic", "4.0.0.pre.alpha1"
s.add_runtime_dependency "pg"
s.add_runtime_dependency "will_paginate", ">= 3.0.0"
Expand Down
Loading