mirror of
https://github.com/sloanelybutsurely/typeid-elixir.git
synced 2024-11-28 01:42:54 -05:00
Lower Elixir and OTP requirement to 1.11, OTP 21 (#12)
* lower elixir requirement, expand testing matrix * use simpler versions * downgrade ubuntu version, don't fail fast * use elixir & otp versions in cache names
This commit is contained in:
parent
bcd9b2fee3
commit
fa0e1f48e4
2 changed files with 21 additions and 14 deletions
33
.github/workflows/ci.yaml
vendored
33
.github/workflows/ci.yaml
vendored
|
@ -14,21 +14,26 @@ permissions:
|
|||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test on OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
|
||||
runs-on: ubuntu-20.04
|
||||
name: Test on OTP ${{matrix.pair.otp}} / Elixir ${{matrix.pair.elixir}}
|
||||
strategy:
|
||||
# Specify the OTP and Elixir versions to use when building
|
||||
# and running the workflow steps.
|
||||
fail-fast: false
|
||||
matrix:
|
||||
otp: ['26.0.2'] # Define the OTP version [required]
|
||||
elixir: ['1.15.0'] # Define the elixir version [required]
|
||||
include:
|
||||
- pair:
|
||||
elixir: '1.11'
|
||||
otp: '21'
|
||||
- pair:
|
||||
elixir: '1.15'
|
||||
otp: '26'
|
||||
lint: lint
|
||||
steps:
|
||||
# Step: Setup Elixir + Erlang image as the base.
|
||||
- name: Set up Elixir
|
||||
uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: ${{matrix.otp}}
|
||||
elixir-version: ${{matrix.elixir}}
|
||||
otp-version: ${{matrix.pair.otp}}
|
||||
elixir-version: ${{matrix.pair.elixir}}
|
||||
|
||||
# Step: Check out the code.
|
||||
- name: Checkout code
|
||||
|
@ -42,9 +47,9 @@ jobs:
|
|||
cache-name: cache-elixir-deps
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-mix-${{ env.cache-name }}-
|
||||
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ env.cache-name }}-
|
||||
|
||||
# Step: Define how to cache the `_build` directory. After the first run,
|
||||
# this speeds up tests runs a lot. This includes not re-compiling our
|
||||
|
@ -56,10 +61,10 @@ jobs:
|
|||
cache-name: cache-compiled-build
|
||||
with:
|
||||
path: _build
|
||||
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-mix-${{ env.cache-name }}-
|
||||
${{ runner.os }}-mix-
|
||||
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ env.cache-name }}-
|
||||
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-
|
||||
|
||||
# Step: Conditionally bust the cache when job is re-run.
|
||||
# Sometimes, we may have issues with incremental builds that are fixed by
|
||||
|
@ -83,12 +88,14 @@ jobs:
|
|||
# Customize this step if a different behavior is desired.
|
||||
- name: Compiles without warnings
|
||||
run: mix compile --warnings-as-errors
|
||||
if: ${{ matrix.lint }}
|
||||
|
||||
# Step: Check that the checked in code has already been formatted.
|
||||
# This step fails if something was found unformatted.
|
||||
# Customize this step as desired.
|
||||
- name: Check Formatting
|
||||
run: mix format --check-formatted
|
||||
if: ${{ matrix.lint }}
|
||||
|
||||
# Step: Execute the tests.
|
||||
- name: Run tests
|
||||
|
|
2
mix.exs
2
mix.exs
|
@ -7,7 +7,7 @@ defmodule TypeID.MixProject do
|
|||
[
|
||||
app: :typeid_elixir,
|
||||
version: @version,
|
||||
elixir: "~> 1.15",
|
||||
elixir: "~> 1.11",
|
||||
start_permanent: Mix.env() == :prod,
|
||||
description: description(),
|
||||
package: package(),
|
||||
|
|
Loading…
Reference in a new issue