Skip to content

Commit

Permalink
Fix CI on Elixir 1.10 (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide authored Dec 26, 2023
1 parent 35b60e2 commit fbba4c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ jobs:
elixir-version: ${{ matrix.pair.elixir }}

- name: Install dependencies
run: mix deps.get

- name: Ensure mix.lock is up to date
run: mix deps.get --check-locked
if: ${{ matrix.lint }}

- name: Ensure that files are formatted
run: mix format --check-formatted
if: ${{ matrix.lint }}

- name: Check for unused dependencies
run: mix do deps.get, deps.unlock --check-unused
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}

- name: Run tests
Expand Down
8 changes: 7 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ defmodule Plug.MixProject do
def deps do
[
{:mime, "~> 1.0 or ~> 2.0"},
{:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0"},
{:plug_crypto, plug_crypto_version()},
{:telemetry, "~> 0.4.3 or ~> 1.0"},
{:ex_doc, "~> 0.21", only: :docs}
]
end

if Version.match?(System.version(), "~> 1.10.0") do
defp plug_crypto_version, do: "~> 1.1.1 or ~> 1.2"
else
defp plug_crypto_version, do: "~> 1.1.1 or ~> 1.2 or ~> 2.0"
end

defp package do
%{
licenses: ["Apache-2.0"],
Expand Down

0 comments on commit fbba4c2

Please sign in to comment.