Skip to content

Commit 4f57ac2

Browse files
committed
Omit MySQL service with if condition
1 parent 827596a commit 4f57ac2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,18 @@ jobs:
5555

5656
strategy:
5757
matrix:
58-
mode: [SQLite, MySQL, SaaS]
58+
include:
59+
- mode: SQLite
60+
db_adapter: sqlite
61+
- mode: MySQL
62+
db_adapter: mysql
63+
- mode: SaaS
64+
db_adapter: mysql
5965

6066
services:
6167
mysql:
62-
image: 'mysql:8.0'
68+
if: ${{ matrix.db_adapter == 'mysql' }}
69+
image: mysql:8.0
6370
env:
6471
MYSQL_ALLOW_EMPTY_PASSWORD: yes
6572
MYSQL_DATABASE: fizzy_test
@@ -73,7 +80,7 @@ jobs:
7380
7481
env:
7582
RAILS_ENV: test
76-
DATABASE_ADAPTER: ${{ matrix.mode == 'SQLite' && 'sqlite' || 'mysql' }}
83+
DATABASE_ADAPTER: ${{ matrix.db_adapter }}
7784
${{ matrix.mode == 'SaaS' && 'SAAS' || 'SAAS_DISABLED' }}: ${{ matrix.mode == 'SaaS' && '1' || '' }}
7885
BUNDLE_GEMFILE: ${{ matrix.mode == 'SaaS' && 'Gemfile.saas' || 'Gemfile' }}
7986
MYSQL_HOST: 127.0.0.1

0 commit comments

Comments
 (0)