ninech / netbox-client-ruby

A ruby client library for Netbox v2.
MIT License
24 stars 21 forks source link

Add faraday matrix to CI #63

Closed rossta closed 11 months ago

rossta commented 11 months ago

Problem

netbox-client-ruby supports Faraday 0.11.x up to 1.x. Faraday 2 has been out since Jan 2022. There are some incompatibilities across this range of Faraday versions, e.g. Faraday 0.x does not appear to work with Ruby 3.x. Only Faraday 1.x is tested on CI and there is not currently a strategy to test multiple Faraday versions.

Solution

Adopt a Gemfile matrix for CI to test multiple versions of Faraday against multiple versions of Ruby from 2.7-3.2.

This change adds additional gemfiles in the gemfiles/ directory for exercising tests against the minimum supported version of Faraday 0.11 and the most recent supported Faraday 1.x version. This also enables change I have in progress to add support for Faraday 2.x https://github.com/ninech/netbox-client-ruby/pull/65.

Now bin/setup will install gems for each gemfile and the current Ruby.

To run tests against Faraday 0.x for example, one would run:

BUNDLE_GEMFILE=gemfile/faraday0.gemfile bundle exec rspec