I am using github actions to run tests for my Elixir repo. Here is part of my github workflow .yml:
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: '23.1.2'
elixir-version: '1.11.2'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}-myapp
restore-keys: ${{ runner.os }}-mix-myapp-
- name: Restore build cache
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles('mix.lock') }}-myapp
restore-keys: ${{ runner.os }}-build-myapp
- name: Get deps
run: |
mix local.hex --force
mix local.rebar
mix deps.get
- name: Compile
run: mix compile
- name: Test
run: mix test
I followed cache/examples.md at main · actions/cache · GitHub but still my compile time is very slow when I do PRs. Did I do somethings wrong? Maybe I need more options for restore-keys? Compile time sometimes is 3 minutes. Thank you for ideas!






















