Skip to content

Commit 3f64815

Browse files
committed
cache for dep and _build and separate deps.compile step
1 parent 83b9d9d commit 3f64815

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,22 @@ jobs:
2929
with:
3030
otp-version: ${{matrix.otp}}
3131
elixir-version: ${{matrix.elixir}}
32+
- name: Deps and _build cache
33+
uses: actions/cache@v4
34+
id: deps-cache
35+
with:
36+
path: |
37+
deps
38+
_build
39+
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
3240
- name: Install Dependencies
41+
if: steps.deps-cache.outputs.cache-hit != 'true'
3342
run: |
3443
mix local.hex --force
3544
mix local.rebar --force
3645
mix deps.get --only test
46+
- run: mix deps.compile
47+
if: steps.deps-cache.outputs.cache-hit != 'true'
3748
- run: mix format --check-formatted
3849
if: matrix.check_formatted
3950
- run: mix compile --warnings-as-errors

0 commit comments

Comments
 (0)