Skip to content

Added CI tests (#1) #14

Added CI tests (#1)

Added CI tests (#1) #14

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: 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
run: |
MIX_ENV=test mix dialyzer