diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46a59bcc..07f89022 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-20.04 env: MIX_ENV: test + PLUG_CRYPTO_2_0: "${{ matrix.PLUG_CRYPTO_2_0 }}" strategy: fail-fast: false matrix: @@ -18,10 +19,12 @@ jobs: - pair: elixir: "1.10.4" otp: "21.3" + PLUG_CRYPTO_2_0: "false" - pair: elixir: "1.16" otp: "26.2" - lint: lint + lint: lint + PLUG_CRYPTO_2_0: "true" steps: - uses: actions/checkout@v4 diff --git a/mix.exs b/mix.exs index d498f96a..a571314b 100644 --- a/mix.exs +++ b/mix.exs @@ -51,10 +51,10 @@ defmodule Plug.MixProject do ] end - if Version.match?(System.version(), "~> 1.10.0") do - defp plug_crypto_version, do: "~> 1.1.1 or ~> 1.2" - else + if System.get_env("PLUG_CRYPTO_2_0", "true") == "true" do defp plug_crypto_version, do: "~> 1.1.1 or ~> 1.2 or ~> 2.0" + else + defp plug_crypto_version, do: "~> 1.1.1 or ~> 1.2" end defp package do