Skip to content

Commit

Permalink
Bump minimal version of elixir, to currently supported one
Browse files Browse the repository at this point in the history
  • Loading branch information
Argonus committed Feb 25, 2024
1 parent 4ca6c43 commit bd58425
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 74 deletions.
78 changes: 38 additions & 40 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,43 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
strategy:
matrix:
elixir: ['1.12.3']
otp: ['24.3.4']
elixir: ['1.16']
otp: ['26.2']

steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout Github repo
uses: actions/checkout@v2

- name: Setup elixir & erlang environment
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.otp}} # Define the OTP version [required]
experimental-otp: true # More info https://github.com/actions/setup-elixir/issues/31

- name: Retrieve Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
mix dialyzer --plt
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout Github repo
uses: actions/checkout@v2

- name: Setup elixir & erlang environment
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.otp}} # Define the OTP version [required]

- name: Retrieve Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
mix dialyzer --plt
static_code_analysis:
name: Static Code Analysis
Expand All @@ -64,8 +63,8 @@ jobs:
strategy:
fail-fast: false
matrix:
elixir: ['1.12.3']
otp: ['24.3.4']
elixir: ['1.16']
otp: ['26.2']

steps:
- name: Cancel Previous Runs
Expand All @@ -83,7 +82,6 @@ jobs:
with:
elixir-version: ${{matrix.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.otp}} # Define the OTP version [required]
experimental-otp: true # More info https://github.com/actions/setup-elixir/issues/31

- name: Retrieve Cached Dependencies
uses: actions/cache@v2
Expand All @@ -105,4 +103,4 @@ jobs:
run: mix credo

- name: Run Dialyzer
run: mix dialyzer --no-check
run: mix dialyzer --no-check
38 changes: 14 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ on:

jobs:
setup:
name: test / setup
name: test | setup dependencies
runs-on: ubuntu-20.04
env:
MIX_ENV: test
strategy:
matrix:
pair:
- elixir: 1.16
otp: 26.1
- elixir: 1.14
otp: 25.2
- elixir: 1.13
otp: 24.3
- elixir: 1.11
otp: 21.3
- elixir: 1.8
otp: 20.3
- elixir: 1.12
otp: 22.3

steps:
- name: Cancel previous runs
Expand All @@ -36,21 +34,20 @@ jobs:
with:
elixir-version: ${{matrix.pair.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.pair.otp}} # Define the OTP version [required]
experimental-otp: true # More info https://github.com/actions/setup-elixir/issues/31

- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v2
id: mix-cache # id to use in retrieve action
with:
path: deps
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Retrieve Mix Dependencies Compilation Cache
uses: actions/cache@v2
id: mix-deps-compile-cache # id to use in retrieve action
with:
path: _build
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -74,14 +71,12 @@ jobs:
fail-fast: false
matrix:
pair:
- elixir: 1.16
otp: 26.1
- elixir: 1.14
otp: 25.2
- elixir: 1.13
otp: 24.3
- elixir: 1.11
otp: 21.3
- elixir: 1.8
otp: 20.3
- elixir: 1.12
otp: 22.3

steps:
- uses: actions/checkout@v2
Expand All @@ -90,25 +85,20 @@ jobs:
with:
elixir-version: ${{matrix.pair.elixir}} # Define the elixir version [required]
otp-version: ${{matrix.pair.otp}} # Define the OTP version [required]
experimental-otp: true # More info https://github.com/actions/setup-elixir/issues/31

- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v2
id: mix-cache # id to use in retrieve action
with:
path: deps
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Retrieve Mix Dependencies Compilation Cache
uses: actions/cache@v2
id: mix-deps-compile-cache # id to use in retrieve action
with:
path: _build
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-mix-deps-compile-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}

- name: Docker-compose up
run: ./scripts/docker_up.sh
- name: Docker ps
run: docker ps -a
- name: Run Tests
- name: Run tests
run: ./scripts/ci_tests.sh
11 changes: 1 addition & 10 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ defmodule KafkaEx.Mixfile do
[
app: :kafka_ex,
version: @version,
elixir: "~> 1.8",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_deps: :transitive,
plt_add_apps: [:ssl],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
flags: [
Expand All @@ -25,7 +24,6 @@ defmodule KafkaEx.Mixfile do
description: description(),
package: package(),
deps: deps(),
dialyzer: dialyzer(),
docs: [
main: "readme",
extras: [
Expand Down Expand Up @@ -76,11 +74,4 @@ defmodule KafkaEx.Mixfile do
links: %{"GitHub" => @source_url}
]
end

defp dialyzer do
[
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
]
end
end

0 comments on commit bd58425

Please sign in to comment.