marpo60
Blend - test your package against different versions of its dependencies
We developed Blend a new hex package that solves the problem of testing your library against different version of its dependencies.
For example, an elixir package that depends on plug_crypto with a requirement of ~> 1.2 or ~> 2.0 , that wants to test against the two major versions, would normally have it’s mix.lock resolved to 2.x .
So there is no straightforward way of running your test locally and in the CI against 1.x and 2.x.
Blend tries to solve this. Inspired in a similar tool that exists in the ruby ecosystem called appraisal
You can create different blends and it will take care of you in generating alternative mix lockfiles and a simple way of running test against them.
Hope you like it!
Most Liked
tiagoefmoraes
Hey Marcelo, thanks for Blend , it’s awesome.
I just merged Surface’s PR and added it to Surface Catalogue
blend/premix.exs is very powerful, I could make custom modifications that Surface Catalogue needed.
Blend makes working with a local copy of Surface simple (BLEND=local mix ...) and fast because each blend has it’s own deps and _build directories.
marpo60
marpo60
Hi Eiji,
For example in Github Actions you can achieve 1 and 2 using the matrix feature with blend.
We have been using blend in candlex for testing against different version of nx (0.6 and 0.7 in this case)
Initial implementation and follow up
At the end of the day it would look like this in your CI workflow
matrix:
include:
- elixir_version: 1.16.0
otp_version: '26.2.1'
lint: true
- elixir_version: 1.15.7
otp_version: '25.3.2.8'
- elixir_version: 1.15.7
otp_version: '25.3.2.8'
blend: "nx06"
You can take a look at the full CI workflow here
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









