Skip to content

Commit

Permalink
Only forbid plug_crypto 2.0 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Dec 26, 2023
1 parent fbba4c2 commit 2e078cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ jobs:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
PLUG_CRYPTO_2_0: "${{ matrix.PLUG_CRYPTO_2_0 }}"
strategy:
fail-fast: false
matrix:
include:
- 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

Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e078cf

Please sign in to comment.