Skip to content

Added CI tests

Added CI tests #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
pull-requests: write
jobs:
unit_tests:
name: Unit tests Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- elixir: "1.16"
otp: "26"
- elixir: "1.15"
otp: "26"
- elixir: "1.14"
otp: "25"
- elixir: "1.13"
otp: "24"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore plt cache
if: ${{ matrix.otp == '25' && matrix.elixir == '1.14' }}
uses: actions/cache@v3
with:
path: priv/plts
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Install deps
run: mix deps.get
- name: Check Formatting
run: mix format --check-formatted
- name: Run unit tests
run: |
mix clean
mix test
- name: Run dialyzer
if: ${{ matrix.otp == '25' && matrix.elixir == '1.14' }}
run: |
mkdir -p priv/plts/{local,core}
MIX_ENV=test mix dialyzer