diff --git a/codecov.yml b/codecov.yml index 5487ce1b1..a42cc977e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -14,6 +14,7 @@ ignore: - "**/*.svg" - "lib/sitemap_generator" - "lib/generators" + - "lib/tasks/custom_seeds.rake" coverage: status: patch: diff --git a/db/seeds_staging.rb b/db/seeds_staging.rb new file mode 100644 index 000000000..e472123e9 --- /dev/null +++ b/db/seeds_staging.rb @@ -0,0 +1,2 @@ +filename = Rails.root.join("db/seeds.rb") +load(filename) diff --git a/lib/tasks/e2e_seed.rake b/lib/tasks/custom_seeds.rake similarity index 70% rename from lib/tasks/e2e_seed.rake rename to lib/tasks/custom_seeds.rake index da588b59e..30b215986 100644 --- a/lib/tasks/e2e_seed.rake +++ b/lib/tasks/custom_seeds.rake @@ -8,7 +8,7 @@ namespace :db do raise "Attempting to seed production environment, aborting!" if Rails.env.production? filename = SEED_DIR.join("seeds_e2e.rb") - load(filename) if File.exist?(filename) + load(filename) end desc "Creator Onboarding seed data for e2e tests" @@ -16,7 +16,14 @@ namespace :db do raise "Attempting to seed production environment, aborting!" if Rails.env.production? filename = SEED_DIR.join("creator_onboarding_seed_e2e.rb") - load(filename) if File.exist?(filename) + load(filename) + end + + desc "Preview environment seed data for Uffizzi" + task staging: :environment do + raise "Attempting to seed production environment, aborting!" if Rails.env.production? + + load(Rails.root.join("db/seeds_staging.rb")) end end end diff --git a/uffizzi/db_seed.sh b/uffizzi/db_seed.sh index ac9823159..f78602aab 100755 --- a/uffizzi/db_seed.sh +++ b/uffizzi/db_seed.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -bundle exec rake db:seed +SEEDS_MULTIPLIER=2 bundle exec rake db:seed:staging -tail -f /dev/null \ No newline at end of file +tail -f /dev/null