File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed
Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change 66 pull_request :
77 branches : [ master ]
88
9- # ------------------------------------------------------------
10- # Matrix definition – all DB‑specific fields live here
11- # ------------------------------------------------------------
129jobs :
1310 test :
1411 strategy :
2320 db : postgresql
2421 ruby_image : ruby:3.2
2522 db_image : postgres:15
26- db_env :
27- POSTGRES_PASSWORD : postgres
2823 db_ports :
2924 - 5432:5432
3025 db_options : >-
3732 db : postgresql
3833 ruby_image : ruby:3.2
3934 db_image : postgres:15
40- db_env :
41- POSTGRES_PASSWORD : postgres
4235 db_ports :
4336 - 5432:5432
4437 db_options : >-
5245 db : mysql
5346 ruby_image : ruby:3.2
5447 db_image : mysql:8
55- db_env :
56- MYSQL_ROOT_PASSWORD : root
57- MYSQL_DATABASE : test
5848 db_ports :
5949 - 3306:3306
6050 db_options : >-
6757 db : mysql
6858 ruby_image : ruby:3.2
6959 db_image : mysql:8
70- db_env :
71- MYSQL_ROOT_PASSWORD : root
72- MYSQL_DATABASE : test
7360 db_ports :
7461 - 3306:3306
7562 db_options : >-
@@ -87,17 +74,17 @@ jobs:
8774 services :
8875 db :
8976 image : ${{ matrix.db_image }}
90- env : ${{ matrix.db_env }}
77+ env :
78+ POSTGRES_PASSWORD : ${{ matrix.db == 'postgresql' && 'postgres' || '' }}
79+ MYSQL_ROOT_PASSWORD : ${{ matrix.db == 'mysql' && 'root' || '' }}
80+ MYSQL_DATABASE : ${{ matrix.db == 'mysql' && 'test' || '' }}
9181 ports :
9282 - ${{ matrix.db_ports[0] }}
9383 options : ${{ matrix.db_options }}
9484
9585 env :
9686 RAILS_VERSION : ${{ matrix.rails }}
97- DATABASE_URL : >-
98- ${{ matrix.db == 'sqlite3' && 'sqlite3::memory:' ||
99- matrix.db == 'postgresql' && 'postgresql://postgres:postgres@localhost:5432/test' ||
100- matrix.db == 'mysql' && 'mysql2://root:root@localhost:3306/test' }}
87+ DATABASE_URL : ${{ matrix.db == 'sqlite3' && 'sqlite3::memory:' || matrix.db == 'postgresql' && 'postgresql://postgres:postgres@localhost:5432/test' || 'mysql2://root:root@localhost:3306/test' }}
10188
10289 steps :
10390 - uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments