From b7bfd9cca598b005aa0668dd7537975c6849535c Mon Sep 17 00:00:00 2001 From: Andrew Timberlake Date: Tue, 22 Oct 2024 08:44:15 +0200 Subject: [PATCH] Update to Elixir 1.10 (Application.compile_env/1) --- .github/workflows/elixir.yml | 66 +++++++++++++++--------------------- mix.exs | 2 +- 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index e380301..d759f01 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -2,61 +2,49 @@ name: Elixir CI on: push: - branches: ['master'] + branches: [main] pull_request: - branches: ['master'] + branches: [main] + +env: + MIX_ENV: test permissions: contents: read jobs: - test: - strategy: - matrix: - include: - - elixir: 1.10.4 - otp: 23.3.4.18 - runs-on: ubuntu-18.04 - - elixir: 1.11.4 - otp: 24.3.4.7 - runs-on: ubuntu-22.04 - - elixir: 1.12.3 - otp: 24.3.4.7 - runs-on: ubuntu-22.04 - - elixir: 1.13.4 - otp: 25.2 - runs-on: ubuntu-22.04 - - elixir: 1.14.2 - otp: 24.3.4.7 - runs-on: ubuntu-22.04 - - elixir: 1.14.2 - otp: 25.2 - runs-on: ubuntu-22.04 - + build: name: Build and test - runs-on: ${{ matrix.runs-on }} - - env: - MIX_ENV: test + runs-on: ubuntu-latest + strategy: + matrix: + elixir: ['1.14.5', '1.15.4', '1.16.3', '1.17.3'] + erlang: ['24.3', '25.3', '26.0', '27.1'] + exclude: + - elixir: '1.14.5' + erlang: '27.1' + - elixir: '1.15.4' + erlang: '27.1' + - elixir: '1.16.3' + erlang: '27.1' + - elixir: '1.17.3' + erlang: '24.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Elixir uses: erlef/setup-beam@v1 with: + version-type: 'loose' elixir-version: ${{ matrix.elixir }} - otp-version: ${{ matrix.otp }} + otp-version: ${{ matrix.erlang }} - name: Restore dependencies cache uses: actions/cache@v3 with: path: deps - key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }} - restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix- - - name: mix-deps - if: steps.mix-cache.outputs.cache-hit != 'true' - run: | - mix local.rebar --force - mix local.hex --force - mix deps.get + key: ${{ runner.os }}-${{ matrix.erlang }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-${{ matrix.erlang }}-${{ matrix.elixir }}-mix- + - name: Install dependencies + run: mix deps.get - name: Run tests run: mix test diff --git a/mix.exs b/mix.exs index ca2a964..81f19de 100644 --- a/mix.exs +++ b/mix.exs @@ -13,7 +13,7 @@ defmodule Shorthand.MixProject do """, license: "MIT", version: @version, - elixir: "~> 1.3", + elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps(), source_url: @github_url,