caxlsx / caxlsx_rails

A Rails plugin to provide templates for the axlsx gem
MIT License
735 stars 84 forks source link

Travis build failing for Rails 6 #154

Closed straydogstudio closed 1 year ago

straydogstudio commented 2 years ago

For some reason rspec is not loading ActionView under Rails 6, so the railtie load fails.

See https://github.com/caxlsx/caxlsx_rails/blob/master/lib/axlsx_rails/railtie.rb and https://www.travis-ci.org/github/caxlsx/caxlsx_rails/jobs/759347309

If anyone has ideas, please contribute. I am expecting the Rails dummy_6 directory is malformed. I'll have to recreate it as a Rails 6.1 application and adapt it to the test to find out.

timdiggins commented 1 year ago

I was having a look at this and unfortunately the travis log is no longer present.

I've run specs locally against rails-6.0 and rails-5.2 and they give only failures if run against caxslx 3.2.0. If I limit it to <3.2 then it runs clean against both. (see https://github.com/caxlsx/caxlsx/issues/138)

So unless it's something highly travis specific, I think it's fixed.

Is it possible though to get travis running again (asking travis for credits etc)?

Maybe worth dropping antique EOL'd rails from support and the test suite (e.g. up to 5.2 -- 5.2 is officially EOL but only recently)?

straydogstudio commented 1 year ago

@timdiggins The caxlsx gem has already been moved to testing under github. That needs to happen here too.

See: https://github.com/caxlsx/caxlsx/blob/master/.github/workflows/test.yml

timdiggins commented 1 year ago

Ah ok. Sounds good. Some follow-on questions:

straydogstudio commented 1 year ago

PR is quite welcome! Let's keep the early rails / rubies for now. It is still used in those environments, and has pretty simple requirements. Perhaps we do this in two phases. Get the Github actions working, then create the new Rails directories for 6.1 and 7?

I should write the docs on generating the dummy. It's not too hard, but a bit tedious. The rails app is pretty simple, but you do have to generate it and set up the controllers/views to match the tests. It shouldn't be too hard to figure out if you look at the existing dummy directories.

timdiggins commented 1 year ago

I've got a first version of this as #159

This encorporates #158, which is actually nothing to do with github actions (but without it, there are multiple failures)

straydogstudio commented 1 year ago

@timdiggins Sorry it took so long to merge this. I kept meaning to get in and fix a few things. In the end @kiskoza did lots of cleanup work in the testing code so it wasn't so messy. Testing is happening successfuly. Many thanks to you both.