Skip to content

Commit

Permalink
actions:
Browse files Browse the repository at this point in the history
- use `erlef/setup-beam@v1` instead of container
- use gh cache@v4
- always save cache
  • Loading branch information
type1fool committed Jul 14, 2024
1 parent 8c0cb6b commit 4a7763a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,40 @@ jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
container: ${{ matrix.elixir }}
concurrency: production
strategy:
matrix:
elixir: ["elixir:latest"]

steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
version-file: .tool-versions
- run: elixir --version
- run: mix local.hex --force
- run: mix local.rebar --force

- name: Hex Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
save-always: true
path: deps
key: ${{ runner.os }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-${{ matrix.elixir }}-mix-
${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-mix-
${{ runner.os }}-
- name: Install dependencies
run: mix deps.get

- name: Compilation Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
save-always: true
path: _build
key: ${{ runner.os }}-${{ matrix.elixir }}-compiled-${{ hashfiles('./mix.lock') }}
key: ${{ runner.os }}-compiled-${{ hashfiles('./mix.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-compiled-${{ hashfiles('./mix.lock') }}
${{ runner.os }}-${{ matrix.elixir }}-compiled-
${{ runner.os }}-compiled-${{ hashfiles('./mix.lock') }}
${{ runner.os }}-compiled-
${{ runner.os }}-
- name: Compile
Expand Down

0 comments on commit 4a7763a

Please sign in to comment.