1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Run Active Storage tests in CI (#30144)

This commit is contained in:
George Claghorn 2017-08-10 15:58:30 -04:00 committed by Rafael França
parent 8f44d16619
commit e43ba973a3
6 changed files with 21 additions and 21 deletions

View file

@ -45,7 +45,7 @@ env:
matrix:
- "GEM=railties"
- "GEM=ap,ac"
- "GEM=am,amo,as,av,aj"
- "GEM=am,amo,as,av,aj,ast"
- "GEM=as PRESERVE_TIMEZONES=1"
- "GEM=ar:mysql2"
- "GEM=ar:sqlite3"

View file

@ -1,13 +1,6 @@
require "test_helper"
require "database/setup"
# ActiveRecord::Base.logger = Logger.new(STDOUT)
class User < ActiveRecord::Base
has_one_attached :avatar
has_many_attached :highlights
end
class ActiveStorage::AttachmentsTest < ActiveSupport::TestCase
include ActiveJob::TestHelper

View file

@ -1,10 +1,10 @@
s3:
service: S3
access_key_id: <%= ENV["AWS_ACCESS_KEY_ID"] %>
secret_access_key: <%= ENV["AWS_SECRET_KEY"] %>
region: us-east-2
bucket: rails-ci-activestorage
# s3:
# service: S3
# access_key_id: ""
# secret_access_key: ""
# region: ""
# bucket: ""
#
# gcs:
# service: GCS
# keyfile: {

View file

@ -1,10 +1,6 @@
require "test_helper"
require "database/setup"
class User < ActiveRecord::Base
has_one_attached :avatar
end
class ActiveStorage::ImageTagTest < ActionView::TestCase
tests ActionView::Helpers::AssetTagHelper

View file

@ -4,11 +4,15 @@ require "bundler/setup"
require "active_support"
require "active_support/test_case"
require "active_support/testing/autorun"
require "byebug"
begin
require "byebug"
rescue LoadError
end
require "active_job"
ActiveJob::Base.queue_adapter = :test
ActiveJob::Base.logger = nil
ActiveJob::Base.logger = ActiveSupport::Logger.new(nil)
require "active_storage"
@ -58,3 +62,8 @@ end
require "global_id"
GlobalID.app = "ActiveStorageExampleApp"
ActiveRecord::Base.send :include, GlobalID::Identification
class User < ActiveRecord::Base
has_one_attached :avatar
has_many_attached :highlights
end

View file

@ -28,6 +28,7 @@ class Build
"av" => "actionview",
"aj" => "activejob",
"ac" => "actioncable",
"ast" => "activestorage",
"guides" => "guides"
}
@ -163,6 +164,7 @@ ENV["GEM"].split(",").each do |gem|
next if gem == "aj:integration" && isolated
next if gem == "guides" && isolated
next if gem == "av:ujs" && isolated
next if gem == "ast" && isolated
build = Build.new(gem, isolated: isolated)
results[build.key] = build.run!