Skip to content

Commit 272fb90

Browse files
authored
Merge pull request rails#54125 from OuYangJinTing/fix-ci-template
Fix DATABASE_URL variable in the ci template
2 parents 51bc2db + c2a3ab3 commit 272fb90

File tree

2 files changed

+6
-3
lines changed
  • railties/lib/rails/generators/rails

2 files changed

+6
-3
lines changed

railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ jobs:
120120
- name: Run tests
121121
env:
122122
RAILS_ENV: test
123-
<%- if options[:database] == "mysql" || options[:database] == "trilogy" -%>
123+
<%- if options[:database] == "mysql" -%>
124124
DATABASE_URL: mysql2://127.0.0.1:3306
125+
<%- elsif options[:database] == "trilogy" -%>
126+
DATABASE_URL: trilogy://127.0.0.1:3306
125127
<%- elsif options[:database] == "postgresql" -%>
126128
DATABASE_URL: postgres://postgres:postgres@localhost:5432
127129
<%- end -%>

railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ jobs:
8484
- name: Run tests
8585
env:
8686
RAILS_ENV: test
87-
<%- if options[:database] == "mysql" || options[:database] == "trilogy" -%>
87+
<%- if options[:database] == "mysql" -%>
8888
DATABASE_URL: mysql2://127.0.0.1:3306
89+
<%- elsif options[:database] == "trilogy" -%>
90+
DATABASE_URL: trilogy://127.0.0.1:3306
8991
<%- elsif options[:database] == "postgresql" -%>
9092
DATABASE_URL: postgres://postgres:postgres@localhost:5432
9193
<%- end -%>
@@ -100,4 +102,3 @@ jobs:
100102
path: ${{ github.workspace }}/tmp/screenshots
101103
if-no-files-found: ignore
102104
<% end -%>
103-

0 commit comments

Comments
 (0)