Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add faraday matrix to CI #63

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

rossta
Copy link
Contributor

@rossta rossta commented Sep 28, 2023

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 #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

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 version < 2.

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

To run tests against Faraday 0.11 for example, one would run:

BUNDLE_GEMFILE=gemfile/faraday0.gemfile bundle exec rspec
@@ -0,0 +1,95 @@
PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL 😄

The presence of a Gemfile.lock in a gem’s repository ensures that a fresh checkout of the repository uses the exact same set of dependencies every time.

https://bundler.io/guides/faq.html

@thde thde merged commit e956a92 into ninech:master Sep 28, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants