Skip to content

Commit e89769f

Browse files
committed
Give CI matrix jobs readable names
GitHub renders matrix job names from raw axis values by default, so runs showed up as `test (3.3, ACTIVE_RECORD_VERSION=~> 7.2.0, false)` — readable only after squinting. Group the ActiveRecord axis into an object with a short `label` and a `env` payload, then set the job `name:` to `Ruby <ruby-version> / <label>`. Runs now show up as e.g. `Ruby 3.3 / AR 7.2` or `Ruby 4.0 / AR main`.
1 parent 3b73812 commit e89769f

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414

1515
jobs:
1616
test:
17+
name: Ruby ${{ matrix.ruby-version }} / ${{ matrix.active-record.label }}
1718
runs-on: ubuntu-latest
1819
services:
1920
postgres:
@@ -37,40 +38,40 @@ jobs:
3738
fail-fast: false
3839
matrix:
3940
ruby-version: ["3.3", "3.4", "4.0"]
40-
active-record-env:
41-
- "ACTIVE_RECORD_VERSION=~> 7.2.0"
42-
- "ACTIVE_RECORD_VERSION=~> 8.0.0"
43-
- "ACTIVE_RECORD_VERSION=~> 8.1.0"
41+
active-record:
42+
- { label: "AR 7.2", env: "ACTIVE_RECORD_VERSION=~> 7.2.0" }
43+
- { label: "AR 8.0", env: "ACTIVE_RECORD_VERSION=~> 8.0.0" }
44+
- { label: "AR 8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
4445
allow-failure: [false]
4546
include:
4647
- ruby-version: "ruby-head"
47-
active-record-env: "ACTIVE_RECORD_VERSION=~> 8.1.0"
48+
active-record: { label: "AR 8.1", env: "ACTIVE_RECORD_VERSION=~> 8.1.0" }
4849
allow-failure: true
4950
- ruby-version: "4.0"
50-
active-record-env: "ACTIVE_RECORD_BRANCH=main"
51+
active-record: { label: "AR main", env: "ACTIVE_RECORD_BRANCH=main" }
5152
allow-failure: true
5253
- ruby-version: "4.0"
53-
active-record-env: "ACTIVE_RECORD_BRANCH=8-1-stable"
54+
active-record: { label: "AR 8-1-stable", env: "ACTIVE_RECORD_BRANCH=8-1-stable" }
5455
allow-failure: true
5556
- ruby-version: "4.0"
56-
active-record-env: "ACTIVE_RECORD_BRANCH=8-0-stable"
57+
active-record: { label: "AR 8-0-stable", env: "ACTIVE_RECORD_BRANCH=8-0-stable" }
5758
allow-failure: true
5859
- ruby-version: "4.0"
59-
active-record-env: "ACTIVE_RECORD_BRANCH=7-2-stable"
60+
active-record: { label: "AR 7-2-stable", env: "ACTIVE_RECORD_BRANCH=7-2-stable" }
6061
allow-failure: true
6162
continue-on-error: ${{ matrix.allow-failure }}
6263
steps:
6364
- uses: actions/checkout@v6
6465
- name: Select ActiveRecord version
6566
env:
66-
ACTIVE_RECORD_ENV: ${{ matrix.active-record-env }}
67+
ACTIVE_RECORD_ENV: ${{ matrix.active-record.env }}
6768
run: echo "$ACTIVE_RECORD_ENV" >> "$GITHUB_ENV"
6869
- name: Set up Ruby
6970
uses: ruby/setup-ruby@v1
7071
with:
7172
ruby-version: ${{ matrix.ruby-version }}
7273
bundler-cache: true
73-
cache-version: ${{ matrix.active-record-env }}
74+
cache-version: ${{ matrix.active-record.env }}
7475
- name: Set up test database
7576
env:
7677
PGPASSWORD: postgres

0 commit comments

Comments
 (0)