discourse/.github/workflows
Alan Guo Xiang Tan bf3e121323
DEV: Set `config.eager_load = true` on CI (#25032)
Why this change?

When running system tests on our CI, we have been occasionally seeing
server errors like:

```
Error encountered while proccessing /stylesheets/desktop_e58cf7f686aab173f9b778797f241913c2833c39.css
  NoMethodError: undefined method `+' for nil:NilClass
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/path/pattern.rb:139:in `[]'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:127:in `block (2 levels) in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each_with_index'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `block in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `map!'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:32:in `serve'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/routing/route_set.rb:852:in `call'
```

While looking through various Rails issues related to the error above, I
came across https://github.com/rails/rails/pull/27647 which is a fix to
fully initialize routes before the first request is handled. However,
the routes are only fully initialize only if `config.eager_load` is set
to `true`. There is no reason why `config.eager_load` shouldn't be `true` in the
CI environment and this is what a new Rails 7.1 app is generated with.

What does this change do?

Enable `config.eager_load` when `env["CI"]` is present
2023-12-26 13:05:55 +08:00
..
ember-version-enforcement.yml DEV: Correct ember-5 lockfile generation (#24983) 2023-12-20 11:45:01 +00:00
ember-version-lockfiles.yml DEV: Introduce feature-flag for Ember 5 upgrade 2023-11-27 16:40:22 +00:00
labeler.yml DEV: Update actions/labeler to v5 (#24835) 2023-12-12 09:27:58 +08:00
licenses.yml Build(deps): Bump actions/checkout from 3 to 4 (#23500) 2023-09-11 11:42:02 +02:00
linting.yml Build(deps): Bump actions/checkout from 3 to 4 (#23500) 2023-09-11 11:42:02 +02:00
migration-tests.yml DEV: Add GitHub Actions workflow for testing migrations 2023-10-13 16:03:55 +02:00
stale-pr-closer.yml Build(deps): Bump actions/stale from 8 to 9 (#24812) 2023-12-11 09:44:52 +01:00
tests.yml DEV: Set `config.eager_load = true` on CI (#25032) 2023-12-26 13:05:55 +08:00