update readme #14
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MIX_ENV: test | |
jobs: | |
test: | |
name: Test (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: "26.2.1" | |
elixir: "1.16.1" | |
lint: true | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Install Erlang/OTP and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- name: Cache dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
key: | | |
${{ runner.os }}-mix-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}- | |
- name: Install and compile dependencies | |
run: mix do deps.get, deps.compile | |
- name: Check for unused dependencies | |
run: mix deps.unlock --check-unused | |
- name: Check for compilation warnings | |
run: mix compile --force --warnings-as-errors | |
- name: Run tests | |
run: mix test | |
- name: Ensure code is formatted | |
run: mix format --check-formatted | |
- name: Check code consistency | |
run: mix credo --strict | |
- name: Ensure runtime types are correct | |
run: mix dialyzer |