Skip to content

Commit

Permalink
fix: add caching for dialyzer and upgrade all cache actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaAK committed Jul 7, 2023
1 parent 1dbd353 commit b83fe32
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/credo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
MIX_ENV: test

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Rebar & Hex
run: mix local.hex --force && mix local.rebar --force
Expand All @@ -23,11 +23,12 @@ jobs:
- name: Cache Deps & Build
uses: actions/cache@v2
with:
key: ${{github.ref}}-deps-build-cache
key: ${{ runner.os }}-mix-credo-${{ hashFiles('**/mix.lock') }}
path: |
./deps
./_build
!._build/dev/lib/error_message/
restore-keys: |
${{ runner.os }}-mix-credo-
- name: Install Dependencies
run: mix deps.get
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/dialyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ jobs:
run: apk add --no-cache tar

- name: Cache Deps & Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: ${{ runner.os }}-mix-dialyzer-${{ hashFiles('**/mix.lock') }}
path: |
deps
_build
dialyzer
!._build/dev/lib/error_message/
.dialyzer
restore-keys: |
${{ runner.os }}-mix-dialyzer-
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
run: apk add --no-cache tar

- name: Cache Deps & Build
uses: actions/cache@v2
uses: actions/cache@v3
with:
key: ${{github.ref}}-deps-build-cache
key: ${{ runner.os }}-mix-test-${{ hashFiles('**/mix.lock') }}
path: |
./deps
./_build
!._build/dev/lib/error_message/
restore-keys: |
${{ runner.os }}-mix-test-
- name: Install Dependencies
run: mix deps.get
Expand Down
4 changes: 3 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ defmodule PrometheusTelemetry.MixProject do
],

dialyzer: [
plt_add_apps: [:ex_unit, :mix],
plt_add_apps: [:ex_unit, :mix, :credo, :jason],
list_unused_filters: true,
plt_local_path: ".dialyzer",
plt_core_path: ".dialyzer",
ignore_warnings: ".dialyzer-ignore.exs",
flags: [:unmatched_returns, :no_improper_lists]
]
Expand Down

0 comments on commit b83fe32

Please sign in to comment.