diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 539d207a..9123df3a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,8 @@ jobs: elixir: '1.11' - otp: '26.0' elixir: '1.15' + - otp: '27.0' + elixir: '1.17' env: MIX_ENV: test GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/lib/excoveralls/cobertura.ex b/lib/excoveralls/cobertura.ex index 9e43540d..dd58bd2e 100644 --- a/lib/excoveralls/cobertura.ex +++ b/lib/excoveralls/cobertura.ex @@ -188,7 +188,7 @@ defmodule ExCoveralls.Cobertura do # We use Range.new/3 because using x..y//step would give a syntax error on Elixir < 1.12 defp get_slice_range_for_package_name(c_path), do: Range.new(String.length(c_path) + 1, -1, 1) else - defp get_slice_range_for_package_name(c_path), do: (String.length(c_path) + 1)..-1 + defp get_slice_range_for_package_name(c_path), do: Range.new(String.length(c_path) + 1, -1) end defp rate(valid_lines) when length(valid_lines) == 0, do: 0.0 diff --git a/test/settings_test.exs b/test/settings_test.exs index 07c3197c..66e5869f 100644 --- a/test/settings_test.exs +++ b/test/settings_test.exs @@ -15,7 +15,8 @@ defmodule Excoveralls.SettingsTest do test "returns default file path" do assert(Settings.Files.default_file - |> Path.relative_to(File.cwd!) == "lib/excoveralls/../conf/coveralls.json") + |> Path.expand() + |> Path.relative_to(File.cwd!) == "lib/conf/coveralls.json") end test "returns custom file path" do