Skip to content

Commit

Permalink
Run dialyzer checks as GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
mneudert committed Dec 15, 2020
1 parent e305a5b commit 77ecc90
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/dialyzer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Dialyzer

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: setup
uses: actions/setup-elixir@v1
with:
elixir-version: 1.11.2
otp-version: 23.0

- name: mix-cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: mix-deps
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: plt-cache
uses: actions/cache@v1
id: plt-cache
with:
path: plts
key: ${{ runner.os }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}

- name: plt-create
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p plts
mix dialyzer --plt
- name: dialyzer
run: mix dialyzer --no-check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_build/
deps/
doc/
plts/
test/tmp/
4 changes: 3 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ defmodule Instream.MixProject do
:race_conditions,
:underspecs,
:unmatched_returns
]
],
plt_core_path: "plts",
plt_file: {:no_warn, "plts/dialyzer.plt"}
]
end

Expand Down

0 comments on commit 77ecc90

Please sign in to comment.