Skip to content

Commit

Permalink
Bump elixir (#37)
Browse files Browse the repository at this point in the history
* bump elixir

* Fix failing CI

---------

Co-authored-by: dgross881 <[email protected]>
  • Loading branch information
samhamilton and dgross881 authored Jul 10, 2024
1 parent b318338 commit 638755a
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 27 deletions.
82 changes: 57 additions & 25 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,63 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: "26.x"
elixir-version: "1.15.x"
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix deps.unlock --check-unused
- run: mix hex.audit
# -run: mix doctor
- run: mix format --dry-run --check-formatted
- run: mix sobelow --config
- run: mix format --dry-run --check-formatted
- run: mix credo --strict
- run: mix dialyzer
- run: elixir --logger-sasl-reports true -S mix coveralls.json
- uses: codecov/codecov-action@v4
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: "27.x"
elixir-version: "1.17.x"
- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix deps.unlock --check-unused
- run: mix hex.audit
# -run: mix doctor
- run: mix format --dry-run --check-formatted
- run: mix sobelow --config
- run: mix format --dry-run --check-formatted
- run: mix credo --strict
- run: mix dialyzer
- run: elixir --logger-sasl-reports true -S mix coveralls.json
- uses: codecov/codecov-action@v4

elixir_1_17:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: [25.x, 26.x, 27.x]
elixir: [1.17.x]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix do deps.get, compile --all-warnings --warnings-as-errors
- run: mix test

elixir_1_16:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: [24.x, 25.x, 26.x]
elixir: [1.16.x]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix do deps.get, compile --all-warnings --warnings-as-errors
- run: mix test

elixir_1_15:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://github.com/elixir-lang/elixir/releases

elixir 1.17.2-otp-27

# https://github.com/erlang/otp/releases

erlang 27.0

# https://nodejs.org/en

nodejs 20.11.1
2 changes: 1 addition & 1 deletion lib/trailing_slash_plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ defmodule TrailingSlashPlug do
path = conn.request_path

if String.ends_with?(path, "/") && path != "/" do
new_path = String.slice(path, 0..-2)
new_path = String.slice(path, 0..-2//-1)

conn
|> put_status(301)
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule TrailingSlashPlug.MixProject do
[
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.15", only: :test},
{:plug, "~> 1.14"},
{:plug, "~> 1.16"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.11", only: [:dev, :test], runtime: false}
Expand Down

0 comments on commit 638755a

Please sign in to comment.