Skip to content

Commit f1571fe

Browse files
committed
chore: upgrade deps to latest versions
1 parent abc6aa9 commit f1571fe

File tree

9 files changed

+69
-106
lines changed

9 files changed

+69
-106
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
6-
test:
6+
Test:
77
runs-on: ubuntu-latest
8+
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
89
strategy:
910
matrix:
1011
elixir:
11-
- 1.13-slim # otp 24
12-
- 1.12-slim # otp 24
13-
- 1.11-slim # otp 23
14-
- 1.10-slim # otp 22
15-
container:
16-
image: elixir:${{ matrix.elixir }}
12+
- 1.14
13+
- 1.13
14+
otp:
15+
- 25.3
16+
- 24.3
1717
steps:
1818
- uses: actions/checkout@v2
19+
- name: Set up Elixir
20+
uses: erlef/setup-beam@v1
21+
with:
22+
elixir-version: ${{ matrix.elixir }}
23+
otp-version: ${{ matrix.otp }}
24+
version-type: strict
25+
- name: Restore dependencies cache
26+
uses: actions/cache@v2
27+
with:
28+
path: deps
29+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
30+
restore-keys: ${{ runner.os }}-mix-
1931
- name: Install Dependencies
2032
env:
2133
MIX_ENV: test
@@ -26,42 +38,26 @@ jobs:
2638
- name: Run Tests
2739
run: mix test --trace
2840

29-
test-poison3:
41+
Linting:
3042
runs-on: ubuntu-latest
31-
container:
32-
image: elixir:1.10-slim
3343
steps:
3444
- uses: actions/checkout@v2
45+
- name: Set up Elixir
46+
uses: erlef/setup-beam@v1
47+
with:
48+
elixir-version: '1.13'
49+
otp-version: '24.3'
50+
version-type: strict
51+
- name: Restore dependencies cache
52+
uses: actions/cache@v2
53+
with:
54+
path: deps
55+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
56+
restore-keys: ${{ runner.os }}-mix-
3557
- name: Install Dependencies
36-
env:
37-
MIX_ENV: test
38-
LOCKFILE: poison3
3958
run: |
4059
mix local.rebar --force
4160
mix local.hex --force
4261
mix deps.get
43-
- name: Run Tests for poison 3.x
44-
env:
45-
MIX_ENV: test
46-
LOCKFILE: poison3
47-
run: mix test --trace
48-
49-
Linting:
50-
runs-on: ubuntu-latest
51-
steps:
52-
- name: Checkout Code
53-
uses: actions/checkout@v1
54-
55-
- name: Set up Elixir
56-
uses: erlef/setup-beam@v1
57-
with:
58-
elixir-version: "1.14"
59-
otp-version: "24.3"
60-
61-
- name: Install Dependencies
62-
run: |
63-
mix local.rebar --force
64-
mix local.hex --force
65-
mix deps.get
66-
- name: Run Formatter
67-
run: mix format --check-formatted
62+
- name: Check Format
63+
run: mix format --check-formatted

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Config
22

33
config :tesla, adapter: Tesla.Adapter.Httpc
44

5-
if Mix.env() == :test do
5+
if config_env() == :test do
66
config :logger, :console,
77
level: :debug,
88
format: "$date $time [$level] $metadata$message\n"

mix.exs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ defmodule Tesla.Mixfile do
5555
{:mime, "~> 1.0 or ~> 2.0"},
5656

5757
# http clients
58-
{:ibrowse, "4.4.0", optional: true},
58+
{:ibrowse, "~> 4.4", optional: true},
5959
{:hackney, "~> 1.6", optional: true},
6060
{:gun, "~> 1.3", optional: true},
6161
{:finch, "~> 0.13", optional: true},
@@ -74,16 +74,14 @@ defmodule Tesla.Mixfile do
7474
{:fuse, "~> 2.4", optional: true},
7575
{:telemetry, "~> 0.4 or ~> 1.0", optional: true},
7676

77-
# testing & docs
78-
{:opentelemetry_process_propagator, "~> 0.1", only: [:test, :dev]},
79-
{:excoveralls, "~> 0.8", only: :test},
77+
# devtools
78+
{:opentelemetry_process_propagator, ">= 0.0.0", only: [:test, :dev]},
79+
{:excoveralls, ">= 0.0.0", only: :test, runtime: false},
80+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
81+
{:mix_test_watch, ">= 0.0.0", only: :dev},
82+
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
83+
{:inch_ex, ">= 0.0.0", only: :docs},
8084
{:httparrot, "~> 1.3", only: :test},
81-
{:ex_doc, "~> 0.21", only: :dev, runtime: false},
82-
{:mix_test_watch, "~> 1.0", only: :dev},
83-
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
84-
{:inch_ex, "~> 2.0", only: :docs},
85-
86-
# override httparrot dependencies
8785
{:cowlib, "~> 2.9", only: :test, override: true},
8886
{:ranch, "~> 1.8", only: :test, override: true}
8987
]

mix.lock

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

test/lockfiles/poison3.lock

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/support/adapter_case.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defmodule Tesla.AdapterCase do
22
defmacro __using__(adapter: adapter) do
33
quote do
44
@adapter unquote(adapter)
5-
@http "http://localhost:#{Application.get_env(:httparrot, :http_port)}"
6-
@https "https://localhost:#{Application.get_env(:httparrot, :https_port)}"
5+
@http "http://localhost:#{Application.compile_env(:httparrot, :http_port)}"
6+
@https "https://localhost:#{Application.compile_env(:httparrot, :https_port)}"
77

88
defp call(env, opts \\ []) do
99
case @adapter do

test/tesla/adapter/ibrowse_test.exs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
defmodule Tesla.Adapter.IbrowseTest do
22
use ExUnit.Case
3-
43
use Tesla.AdapterCase, adapter: Tesla.Adapter.Ibrowse
5-
64
use Tesla.AdapterCase.Basic
75
use Tesla.AdapterCase.Multipart
86
use Tesla.AdapterCase.StreamRequestBody
9-
107
# SSL test disabled on purpose
11-
# ibrowser seems to have a problem with "localhost" host, as explined in
8+
# ibrowser seems to have a problem with "localhost" host, as explained in
129
# https://github.com/cmullaparthi/ibrowse/issues/162
1310
#
1411
# In case of the test below it results in

test/tesla_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule TeslaTest do
44

55
require Tesla
66

7-
@url "http://localhost:#{Application.get_env(:httparrot, :http_port)}"
7+
@url "http://localhost:#{Application.compile_env(:httparrot, :http_port)}"
88

99
describe "Adapters" do
1010
defmodule ModuleAdapter do

test/test_helper.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
clients = [:ibrowse, :hackney, :gun, :finch, :castore, :mint]
22
Enum.map(clients, &Application.ensure_all_started/1)
3-
4-
ExUnit.configure(trace: false)
53
ExUnit.start()

0 commit comments

Comments
 (0)