From 2e078cf207e6f954e2397e305f05409301c8eee8 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Tue, 26 Dec 2023 20:08:20 +0100 Subject: [PATCH] Only forbid plug_crypto 2.0 in CI --- .github/workflows/ci.yml | 5 ++++- mix.exs | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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