diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 4d884da0..a3ca21e8 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -13,17 +13,17 @@ jobs: build: name: Build and test - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - name: Set up Elixir - uses: erlef/setup-beam@v1 + uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1 with: - elixir-version: '1.14.0' # Define the elixir version [required] - otp-version: '25' # Define the OTP version [required] + version-file: .tool-versions + version-type: strict - name: Restore dependencies cache - uses: actions/cache@v3 + uses: actions/cache@v6 with: path: deps key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} @@ -31,4 +31,4 @@ jobs: - name: Install dependencies run: mix deps.get - name: Run tests - run: mix compile + run: mix compile --warnings-as-errors diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..244d166a --- /dev/null +++ b/.tool-versions @@ -0,0 +1,4 @@ +# Toolchain used by CI (erlef/setup-beam) and by asdf/mise locally. +# Keep elixir_image in the Dockerfile in step with these versions. +erlang 28.5.0.8 +elixir 1.19.7-otp-28 diff --git a/Dockerfile b/Dockerfile index dc9f741a..e8c98fa9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -ARG elixir_image=elixir:1.19.5-alpine +# Keep in step with .tool-versions (the CI toolchain): elixir:1.19.7-alpine is +# Elixir 1.19.7 on erlang:28-alpine. +ARG elixir_image=elixir:1.19.7-alpine FROM ${elixir_image} AS builder diff --git a/lib/schema.ex b/lib/schema.ex index 53d267ea..98959676 100644 --- a/lib/schema.ex +++ b/lib/schema.ex @@ -18,7 +18,6 @@ defmodule Schema do alias Schema.SingleRepo alias Schema.Utils - require Logger @dialyzer :no_improper_lists