From 187a53833d029ea023c8a048e19549c139c06ccb Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 18 Aug 2023 16:11:09 +0200 Subject: [PATCH 1/4] Fix CI --- test/req/steps_test.exs | 2 ++ test/test_helper.exs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/req/steps_test.exs b/test/req/steps_test.exs index 502f20f9..ea82a53e 100644 --- a/test/req/steps_test.exs +++ b/test/req/steps_test.exs @@ -249,6 +249,7 @@ defmodule Req.StepsTest do assert Req.get!(c.url).body == "foo" end + @tag :otp24 test "multiple codecs with multiple headers" do {:ok, listen_socket} = :gen_tcp.listen(0, mode: :binary, active: false) {:ok, port} = :inet.port(listen_socket) @@ -274,6 +275,7 @@ defmodule Req.StepsTest do assert Req.get!("http://localhost:#{port}").body == "foo" end + @tag :otp24 test "brotli", c do Bypass.expect(c.bypass, "GET", "/", fn conn -> {:ok, body} = :brotli.encode("foo") diff --git a/test/test_helper.exs b/test/test_helper.exs index 2a45934c..7152ee21 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,2 +1,5 @@ -ExUnit.configure(exclude: :integration) +excludes = [:integration] +excludes = excludes ++ if System.otp_release() < "24", do: [:otp24], else: [] + +ExUnit.configure(exclude: excludes) ExUnit.start() From 476fd0097e59bcb5e208089c7ccd147af1ec49f8 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 18 Aug 2023 16:14:25 +0200 Subject: [PATCH 2/4] Revert "Fix CI" This reverts commit 187a53833d029ea023c8a048e19549c139c06ccb. --- test/req/steps_test.exs | 2 -- test/test_helper.exs | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/req/steps_test.exs b/test/req/steps_test.exs index ea82a53e..502f20f9 100644 --- a/test/req/steps_test.exs +++ b/test/req/steps_test.exs @@ -249,7 +249,6 @@ defmodule Req.StepsTest do assert Req.get!(c.url).body == "foo" end - @tag :otp24 test "multiple codecs with multiple headers" do {:ok, listen_socket} = :gen_tcp.listen(0, mode: :binary, active: false) {:ok, port} = :inet.port(listen_socket) @@ -275,7 +274,6 @@ defmodule Req.StepsTest do assert Req.get!("http://localhost:#{port}").body == "foo" end - @tag :otp24 test "brotli", c do Bypass.expect(c.bypass, "GET", "/", fn conn -> {:ok, body} = :brotli.encode("foo") diff --git a/test/test_helper.exs b/test/test_helper.exs index 7152ee21..2a45934c 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,5 +1,2 @@ -excludes = [:integration] -excludes = excludes ++ if System.otp_release() < "24", do: [:otp24], else: [] - -ExUnit.configure(exclude: excludes) +ExUnit.configure(exclude: :integration) ExUnit.start() From 5cb2bf59ce59925b89e1d56863bacb600b37244f Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 18 Aug 2023 16:14:31 +0200 Subject: [PATCH 3/4] Fix CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a987f5f..e94ebd9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,14 +25,14 @@ jobs: - uses: erlef/setup-beam@main with: - otp-version: ${{matrix.pair.otp}} - elixir-version: ${{matrix.pair.elixir}} + otp-version: ${{ matrix.pair.otp }} + elixir-version: ${{ matrix.pair.elixir }} version-type: strict - uses: actions/cache@v3 with: path: deps - key: mix-deps-${{ hashFiles('**/mix.lock') }} + key: mix-otp-${{ matrix.pair.otp }}-deps-${{ hashFiles('**/mix.lock') }} - run: mix deps.get From 676a42cf3fefad9d380f2fec58ad14927c7f2cf0 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Fri, 18 Aug 2023 16:25:43 +0200 Subject: [PATCH 4/4] up --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e94ebd9d..06ca8b74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,8 @@ jobs: - uses: actions/cache@v3 with: path: deps + # ezstd and brotli are compiling native objects to deps/x/_build, not _build, + # so we need to cache per OTP key: mix-otp-${{ matrix.pair.otp }}-deps-${{ hashFiles('**/mix.lock') }} - run: mix deps.get