diff --git a/railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt b/railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt index 8f1f78a6b123c..b44873c3c6627 100644 --- a/railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt +++ b/railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt @@ -120,8 +120,10 @@ jobs: - name: Run tests env: RAILS_ENV: test - <%- if options[:database] == "mysql" || options[:database] == "trilogy" -%> + <%- if options[:database] == "mysql" -%> DATABASE_URL: mysql2://127.0.0.1:3306 + <%- elsif options[:database] == "trilogy" -%> + DATABASE_URL: trilogy://127.0.0.1:3306 <%- elsif options[:database] == "postgresql" -%> DATABASE_URL: postgres://postgres:postgres@localhost:5432 <%- end -%> diff --git a/railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt b/railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt index a2e2b6f9f7d83..186720c5157a0 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt +++ b/railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt @@ -84,8 +84,10 @@ jobs: - name: Run tests env: RAILS_ENV: test - <%- if options[:database] == "mysql" || options[:database] == "trilogy" -%> + <%- if options[:database] == "mysql" -%> DATABASE_URL: mysql2://127.0.0.1:3306 + <%- elsif options[:database] == "trilogy" -%> + DATABASE_URL: trilogy://127.0.0.1:3306 <%- elsif options[:database] == "postgresql" -%> DATABASE_URL: postgres://postgres:postgres@localhost:5432 <%- end -%> @@ -100,4 +102,3 @@ jobs: path: ${{ github.workspace }}/tmp/screenshots if-no-files-found: ignore <% end -%> -