diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dde75773..13aafdcbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,8 +13,8 @@ jobs: - name: Set up Elixir uses: erlef/setup-beam@v1 with: - elixir-version: '1.13' - otp-version: '24.3' + elixir-version: '1.15' + otp-version: '25.3' - name: Restore dependencies cache uses: actions/cache@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fede8547a..698ceaf1d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,14 +6,22 @@ jobs: Test: runs-on: ubuntu-latest name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} + continue-on-error: ${{ matrix.experimental }} strategy: matrix: - elixir: - - 1.14 - - 1.13 - otp: - - 25.3 - - 24.3 + include: + - otp: '25.3.2.12' + elixir: '1.15.8' + experimental: false + lint: false + - otp: '26.2.5' + elixir: '1.16.3' + experimental: true + lint: true + - otp: '27.0' + elixir: '1.17.1' + experimental: true + lint: false steps: - uses: actions/checkout@v4 - name: Set up Elixir @@ -37,25 +45,21 @@ jobs: mix deps.get - name: Run Tests run: mix test --trace + - if: ${{ matrix.lint }} + name: Check Format + run: mix format --check-formatted + # This tests with Gun 1, where as the standard Test job tests Gun 2 Test-gun1: runs-on: ubuntu-latest - name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} - Gun1 - strategy: - matrix: - elixir: - - 1.14 - - 1.13 - otp: - - 25.3 - - 24.3 + name: Gun 1 steps: - uses: actions/checkout@v4 - name: Set up Elixir uses: erlef/setup-beam@v1 with: - elixir-version: ${{ matrix.elixir }} - otp-version: ${{ matrix.otp }} + elixir-version: '1.15.8' + otp-version: '25.3.2.12' version-type: strict - name: Restore dependencies cache uses: actions/cache@v4 @@ -75,27 +79,3 @@ jobs: env: LOCKFILE: gun1 run: mix test test/tesla/adapter/gun_test.exs --trace - - Linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - elixir-version: '1.13' - otp-version: '24.3' - version-type: strict - - name: Restore dependencies cache - uses: actions/cache@v4 - with: - path: deps - key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ runner.os }}-mix- - - name: Install Dependencies - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get - - name: Check Format - run: mix format --check-formatted diff --git a/lib/tesla/adapter/hackney.ex b/lib/tesla/adapter/hackney.ex index e5965857f..3d080787f 100644 --- a/lib/tesla/adapter/hackney.ex +++ b/lib/tesla/adapter/hackney.ex @@ -72,7 +72,7 @@ if Code.ensure_loaded?(:hackney) do end defp request(method, url, headers, body, opts) do - handle(:hackney.request(method, url, headers, body || '', opts), opts) + handle(:hackney.request(method, url, headers, body || ~c"", opts), opts) end defp request_stream(method, url, headers, body, opts) do diff --git a/test/tesla/middleware/timeout_test.exs b/test/tesla/middleware/timeout_test.exs index 760ff573f..3a51a76e2 100644 --- a/test/tesla/middleware/timeout_test.exs +++ b/test/tesla/middleware/timeout_test.exs @@ -115,7 +115,7 @@ defmodule Tesla.Middleware.TimeoutTest do [{last_module, _, _, file_info} | _] = __STACKTRACE__ assert Tesla.Middleware.TimeoutTest.Client == last_module - assert file_info[:file] == 'lib/tesla/builder.ex' + assert file_info[:file] == ~c"lib/tesla/builder.ex" assert file_info[:line] == 23 else _ -> @@ -131,7 +131,7 @@ defmodule Tesla.Middleware.TimeoutTest do [_, {timeout_module, _, _, module_file_info} | _] = __STACKTRACE__ assert Tesla.Middleware.Timeout == timeout_module - assert module_file_info == [file: 'lib/tesla/middleware/timeout.ex', line: 59] + assert module_file_info == [file: ~c"lib/tesla/middleware/timeout.ex", line: 59] else _ -> flunk("Expected exception to be thrown")