Update README.md #28
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: [push, pull_request] | |
jobs: | |
format: | |
name: Format and compile with warnings as errors | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install OTP and Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 26.x | |
elixir-version: 1.16.x | |
- name: Install dependencies | |
run: mix deps.get | |
- name: Compile with --warnings-as-errors | |
run: mix compile --warnings-as-errors | |
- name: Run "mix format" | |
run: mix format --check-formatted | |
test: | |
name: Test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: 26.x | |
elixir: 1.16.x | |
coverage: true | |
- otp: 27.x | |
elixir: 1.17.x | |
env: | |
MIX_ENV: test | |
steps: | |
- 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 dependencies | |
run: mix deps.get --only test | |
- name: Run tests | |
run: mix test --trace | |
dialyzer: | |
name: Dialyzer (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: 27.x | |
elixir: 1.17.x | |
steps: | |
- 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 dependencies | |
run: mix deps.get | |
- name: Restore PLT cache | |
uses: actions/cache@v2 | |
id: plt_cache | |
with: | |
key: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt | |
restore-keys: | | |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt | |
path: | | |
priv/plts | |
# 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 |