Skip to content

Running Quickdraw in GitHub Actions doesn't work #54

@marcoroth

Description

@marcoroth

If you add a GitHub Action that runs bundle exec qt using current main (ef9e495) it will fail like:

Run bundle exec qt
bundler: failed to load command: qt (/home/runner/work/difftastic-ruby/difftastic-ruby/vendor/bundle/ruby/3.1.0/bin/qt)
/home/runner/work/difftastic-ruby/difftastic-ruby/vendor/bundle/ruby/3.1.0/bundler/gems/quickdraw-a13f31e80d68/lib/quickdraw/rspec_adapter.rb:6:in `rescue in <top (required)>': You need to add `rspec-expectations` to your Gemfile (LoadError)
	from /home/runner/work/difftastic-ruby/difftastic-ruby/vendor/bundle/ruby/3.1.0/bundler/gems/quickdraw-a13f31e80d68/lib/quickdraw/rspec_adapter.rb:3:in `<top (required)>'

If you add the two gems it complains about (minitest and rspec-expectations) to the projects Gemfile it fails to execute the tests because of the missing difft exectuable (see https://github.com/marcoroth/difftastic-ruby/actions/runs/13009395168/job/36283472466):

./test/labels.test.rb:11
  only left
    unexpected NameError
      uninitialized constant Difftastic::ExecutableNotFoundException
        /home/runner/work/difftastic-ruby/difftastic-ruby/lib/difftastic.rb:49 in `executable'
          /home/runner/work/difftastic-ruby/difftastic-ruby/lib/difftastic.rb:15 in `execute'
            /home/runner/work/difftastic-ruby/difftastic-ruby/lib/difftastic/differ.rb:301 in `diff_files'
              /home/runner/work/difftastic-ruby/difftastic-ruby/lib/difftastic/differ.rb:283 in `diff_strings'
                /home/runner/work/difftastic-ruby/difftastic-ruby/lib/difftastic/differ.rb:26 in `diff_objects'

I think it would make sense that you:

  • don't have to add minitest and rspec-expectations to your project if you don't use them
  • and that it be able to download and install the difft exectuable for difftastic-ruby on its own

Let me know if you have an idea on how to fix/approach this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions