Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVEX-2353]: Test multiple elixir versions in CI #15

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,28 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
version: [
{ elixir: '1.14', otp: '24' },
{ elixir: '1.14', otp: '25' },
{ elixir: '1.15', otp: '24' },
{ elixir: '1.15', otp: '25' },
{ elixir: '1.15', otp: '26' },
{ elixir: '1.16', otp: '24' },
{ elixir: '1.16', otp: '25' },
{ elixir: '1.16', otp: '26' }
# { elixir: '1.17', otp: '25' },
# { elixir: '1.17', otp: '26' },
# { elixir: '1.17', otp: '27' }
]
env:
MIX_ENV: test
steps:
- uses: erlef/setup-beam@v1
with:
elixir-version: 1.16
otp-version: 26
elixir-version: ${{ matrix.version.elixir }}
otp-version: ${{ matrix.version.otp }}

# Check out the code.
- name: Checkout
Expand All @@ -31,9 +46,9 @@ jobs:
cache-name: cache-elixir-deps
with:
path: deps
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
key: ${{ runner.os }}-otp-${{ matrix.version.otp }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-otp-${{ matrix.version.otp }}-mix-${{ env.cache-name }}-
# Define how to cache the `_build` directory.
# After the first run, this speeds up tests runs a lot.
# This includes not re-compiling our project's downloaded deps every run.
Expand All @@ -44,10 +59,10 @@ jobs:
cache-name: cache-compiled-build
with:
path: _build
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
key: ${{ runner.os }}-otp-${{ matrix.version.otp }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.cache-name }}-
${{ runner.os }}-mix-
${{ runner.os }}-otp-${{ matrix.version.otp }}-mix-${{ env.cache-name }}-
${{ runner.os }}-otp-${{ matrix.version.otp }}-mix-
# Conditionally bust the cache when job is re-run.
# Sometimes, we may have issues with incremental builds that are fixed by doing a full recompile.
# In order to not waste dev time on such trivial issues force a full recompile only on builds that are retried.
Expand Down
Loading