Skip to content

Commit 43f13eb

Browse files
committed
ci: actually run the Zeitwerk check
Same dead guard as redmine_gtt: `grep -q zeitwerk config/application.rb` never matches, since Redmine configures Zeitwerk in config/initializers/zeitwerk.rb. The step has been passing without ever running the task.
1 parent 49ada62 commit 43f13eb

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/test-postgis.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,21 @@ jobs:
139139
bundle exec rake generate_secret_token
140140
bundle exec rake db:create db:migrate redmine:plugins:migrate
141141
142+
# Eager-load gate. Test and development environments load lazily, so a
143+
# filename/constant mismatch nothing references at boot can still make a
144+
# production instance (which eager loads) die with a NameError. That is
145+
# what happened to redmine_gtt_sync: green CI, unbootable production.
146+
#
147+
# This previously ran only `if grep -q zeitwerk config/application.rb`,
148+
# which never matches: Redmine configures Zeitwerk in
149+
# config/initializers/zeitwerk.rb, not application.rb. The step therefore
150+
# passed without ever running the task. The rake task ships with Rails 6+,
151+
# so every row in this matrix has it and no guard is needed.
142152
- name: Zeitwerk check
143153
env:
144154
RAILS_ENV: test
145155
working-directory: redmine
146-
run: |
147-
if grep -q zeitwerk config/application.rb ; then
148-
bundle exec rake zeitwerk:check
149-
fi
150-
shell: bash
156+
run: bundle exec rake zeitwerk:check
151157

152158
- name: Run tests
153159
env:

0 commit comments

Comments
 (0)