Skip to content

update readme

update readme #52

Workflow file for this run

name: CI
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
test:
name: Test
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ['ubuntu-latest']
elixir: ['1.16.x']
otp: ['26.x']
steps:
# Setup.
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Elixir
id: beam
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
# Build cache.
- name: Build cache
uses: actions/cache@v3
with:
path: _build
key: build-${{matrix.os}}-${{matrix.otp}}-${{matrix.elixir}}-${{ hashFiles('lib/**/*.ex') }}
restore-keys: build-${{matrix.os}}-${{matrix.otp}}-${{matrix.elixir}}-
# Get and compile elixir deps.
- name: Elixir Deps cache
uses: actions/cache@v3
with:
path: deps
key: mix-${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: mix-${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-
- run: mix deps.get
- run: mix deps.compile
# Compile :dev and :test.
- run: MIX_ENV=dev mix compile --warnings-as-errors
- run: MIX_ENV=test mix compile
# Check for unused dependencies.
- run: mix deps.unlock --check-unused
# Check code quality and style.
- run: mix format --check-formatted
- run: mix credo
# Run the tests with code coverage.
- run: mix test --warnings-as-errors
# Static analysis (Dialyzer).
- name: Restore PLT cache
uses: actions/cache@v3
id: plt_cache
with:
path: priv/plts
key: plt-${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}
restore-keys: plt-${{ matrix.os }}-${{ matrix.elixir }}-${{ matrix.otp }}
# Create PLTs if no cache was found
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer --format github