Skip to content

Commit 906a6d8

Browse files
committed
Refactor CI configuration for improved clarity and organization
1 parent 9d173da commit 906a6d8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
# ------------------------------------------------------------
10+
# Matrix definition – all DB‑specific fields live here
11+
# ------------------------------------------------------------
912
jobs:
1013
test:
1114
strategy:
@@ -14,10 +17,6 @@ jobs:
1417
rails: [ '7.0', '7.1' ]
1518
db: [ sqlite3, postgresql, mysql ]
1619

17-
# -----------------------------------------------------------------
18-
# Define every service‑specific field **once** in `include`.
19-
# All values are plain YAML – no `${{ }}` inside `services`.
20-
# -----------------------------------------------------------------
2120
include:
2221
# ---------- PostgresQL ----------
2322
- rails: '7.0'
@@ -79,19 +78,18 @@ jobs:
7978
--health-timeout 5s
8079
--health-retries 5
8180
81+
# --------------------------------------------------------
82+
# Runner & Service definition – **outside** the matrix
83+
# --------------------------------------------------------
8284
runs-on: ubuntu-latest
83-
84-
# Run the job inside the Ruby Docker image
8585
container: ${{ matrix.ruby_image }}
8686

87-
# -----------------------------------------------------------------
88-
# Service definition – **no expressions** here.
89-
# -----------------------------------------------------------------
9087
services:
9188
db:
9289
image: ${{ matrix.db_image }}
9390
env: ${{ matrix.db_env }}
94-
ports: ${{ matrix.db_ports }} # array from `include`
91+
ports:
92+
- ${{ matrix.db_ports[0] }}
9593
options: ${{ matrix.db_options }}
9694

9795
env:

0 commit comments

Comments
 (0)