WIP Refactoring #6
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 | |
jobs: | |
test: | |
name: Test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: "25.0" | |
elixir: "1.14" | |
lint: true | |
env: | |
MIX_ENV: test | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v2 | |
- name: Install OTP and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Install and compile dependencies | |
run: | | |
mix deps.get --only test | |
mix deps.compile | |
- name: Check formatting | |
run: mix format --check-formatted | |
if: ${{ matrix.lint }} | |
- name: Check no unused dependencies | |
run: mix deps.get && mix deps.unlock --check-unused | |
if: ${{ matrix.lint }} | |
- name: Compile with --warnings-as-errors | |
run: mix compile --warnings-as-errors | |
if: ${{ matrix.lint }} | |
- name: Run tests | |
run: mix test --cover | |
- name: Run dialyzer | |
run: mix dialyzer |