This PR replaces usages of Elixir functions that return random data, allowing us to update the test to work on all supported Elixir versions:
Replace Enum.random with :rand.uniform on Faker.Random.Test.random_between
Replace Enum.random with random_between on Faker.Random.Test.random_bytes
Replace Enum.take_random and Enum.shuffle with Enum.sort_by(random_uniform)
After this changes the only tests breaking was on Faker.File because of the map ordering changes on OTP 26, also fixed it and updated CI to test on both OTP 26 and 27.
This PR replaces usages of Elixir functions that return random data, allowing us to update the test to work on all supported Elixir versions:
Enum.random
with:rand.uniform
onFaker.Random.Test.random_between
Enum.random
withrandom_between
onFaker.Random.Test.random_bytes
Enum.take_random
andEnum.shuffle
withEnum.sort_by(random_uniform)
After this changes the only tests breaking was on
Faker.File
because of the map ordering changes on OTP 26, also fixed it and updated CI to test on both OTP 26 and 27.I've added: