Skip to content

Commit

Permalink
Added backwards compatibility for Elixir down to 1.13 (#46)
Browse files Browse the repository at this point in the history
* Specified range of Elixir and OTP versions supported in CI by template.

* Specified that template supports any Elixir version from 1.13.
  • Loading branch information
Kavignon authored Dec 8, 2024
1 parent 91e4b79 commit f93064d
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 9 deletions.
137 changes: 129 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,46 @@ on:
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Elixir 1.13 combinations
- elixir: '1.13'
otp: '25'

# Elixir 1.14 combinations
- elixir: '1.14'
otp: '25'

# Elixir 1.15 combinations
- elixir: '1.15'
otp: '25'
- elixir: '1.15'
otp: '26'

# Elixir 1.16 combinations
- elixir: '1.16'
otp: '25'
- elixir: '1.16'
otp: '26'

# Elixir 1.17 combinations
- elixir: '1.17'
otp: '25'
- elixir: '1.17'
otp: '26'
- elixir: '1.17'
otp: '27'

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27.1.2'
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Install dependencies
run: mix deps.get
Expand All @@ -35,15 +66,45 @@ jobs:
linting:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
include:
# Elixir 1.13 combinations
- elixir: '1.13'
otp: '25'

# Elixir 1.14 combinations
- elixir: '1.14'
otp: '25'

# Elixir 1.15 combinations
- elixir: '1.15'
otp: '25'
- elixir: '1.15'
otp: '26'

# Elixir 1.16 combinations
- elixir: '1.16'
otp: '25'
- elixir: '1.16'
otp: '26'

# Elixir 1.17 combinations
- elixir: '1.17'
otp: '25'
- elixir: '1.17'
otp: '26'
- elixir: '1.17'
otp: '27'
steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27.1.2'
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Install dependencies (if not cached)
run: mix deps.get
Expand Down Expand Up @@ -76,15 +137,45 @@ jobs:
docker-check:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
include:
# Elixir 1.13 combinations
- elixir: '1.13'
otp: '25'

# Elixir 1.14 combinations
- elixir: '1.14'
otp: '25'

# Elixir 1.15 combinations
- elixir: '1.15'
otp: '25'
- elixir: '1.15'
otp: '26'

# Elixir 1.16 combinations
- elixir: '1.16'
otp: '25'
- elixir: '1.16'
otp: '26'

# Elixir 1.17 combinations
- elixir: '1.17'
otp: '25'
- elixir: '1.17'
otp: '26'
- elixir: '1.17'
otp: '27'
steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27.1.2'
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Build Docker Image
run: |
Expand All @@ -93,15 +184,45 @@ jobs:
testing:
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
include:
# Elixir 1.13 combinations
- elixir: '1.13'
otp: '25'

# Elixir 1.14 combinations
- elixir: '1.14'
otp: '25'

# Elixir 1.15 combinations
- elixir: '1.15'
otp: '25'
- elixir: '1.15'
otp: '26'

# Elixir 1.16 combinations
- elixir: '1.16'
otp: '25'
- elixir: '1.16'
otp: '26'

# Elixir 1.17 combinations
- elixir: '1.17'
otp: '25'
- elixir: '1.17'
otp: '26'
- elixir: '1.17'
otp: '27'
steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: '1.17'
otp-version: '27.1.2'
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}

- name: Install dependencies (if not cached)
run: mix deps.get
Expand Down
3 changes: 2 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ defmodule ElixirKickoff.MixProject do
[
app: :elixir_kickoff,
version: "0.1.0",
elixir: "~> 1.17",
elixir: "~> 1.13",
erlang: "~> 25.0",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: [
Expand Down

0 comments on commit f93064d

Please sign in to comment.