Skip to content

Commit

Permalink
Support test containers only on v1.15 of elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
Argonus committed Dec 2, 2023
1 parent aa1208a commit 764d399
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
strategy:
fail-fast: false
matrix:
elixir: ['1.12.3']
otp: ['24.3.4']
elixir: ['1.15']
otp: ['26.1']

steps:
- name: Cancel Previous Runs
Expand Down
11 changes: 9 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ defmodule Kayrock.MixProject do
{:crc32cer, "~> 0.1"},
{:varint, "~> 1.2"},
{:connection, "~> 1.1"},
# Integration Tests
{:testcontainers, "~> 1.5", only: [:test]},

# Dev/Test
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
Expand All @@ -57,6 +55,15 @@ defmodule Kayrock.MixProject do
{:snappy, git: "https://github.com/fdmanana/snappy-erlang-nif", only: [:dev, :test]},
{:snappyer, "~> 1.2", only: [:dev, :test]}
]
|> integration_test_deps()
end

defp integration_test_deps(deps_list) do
if Version.match?(System.version(), ">= 1.15.0") do
[{:testcontainers, "~> 1.5"} | deps_list]
else
deps_list
end
end

defp elixirc_paths(:test), do: ["lib", "test/support"]
Expand Down

0 comments on commit 764d399

Please sign in to comment.