Update to support Elixir 1.16 #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Elixir Tests & Dialyzer | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
otp: ['25.3', '26.2'] | |
elixir: ['1.13.4', '1.15.8', '1.16.1'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
elixir-version: ${{ matrix.elixir }} | |
otp-version: ${{ matrix.otp }} | |
- name: Retrieve Mix Dependencies Cache | |
uses: actions/cache@v1 | |
id: mix-cache | |
with: | |
path: deps | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Install Mix Dependencies | |
if: steps.mix-cache.outputs.cache-hit != 'true' | |
run: | | |
mix local.rebar --force | |
mix local.hex --force | |
mix deps.get | |
- name: Compile | |
run: MIX_ENV=test mix compile --warnings-as-errors | |
- name: Retrieve PLT Cache | |
uses: actions/cache@v1 | |
id: plt-cache | |
with: | |
path: priv/plts | |
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Run Formatter | |
run: mix format --check-formatted | |
- name: Run credo | |
run: MIX_ENV=test mix credo --strict | |
- name: Run dialyzer | |
run: MIX_ENV=test mix dialyzer --halt-exit-status | |
- name: Run tests | |
run: mix test |