Skip to content

Commit d50b6af

Browse files
committed
Expand workflow to restore caches better
1 parent 0026e32 commit d50b6af

File tree

1 file changed

+21
-41
lines changed

1 file changed

+21
-41
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,26 @@ on:
77

88
jobs:
99
lint:
10-
runs-on: ubuntu-20.04
10+
runs-on: ${{ matrix.os }}
1111
env:
12-
MIX_ENV: test
13-
12+
MIX_ENV: dev
1413
name: Lint
14+
strategy:
15+
matrix:
16+
os: ["ubuntu-20.04"]
17+
elixir: ["1.13"]
18+
otp: ["24"]
1519
steps:
1620
- uses: actions/checkout@v2
17-
1821
- uses: erlef/setup-beam@v1
1922
with:
20-
otp-version: "24"
21-
elixir-version: "1.13"
22-
23+
otp-version: ${{ matrix.otp }}
24+
elixir-version: ${{ matrix.elixir }}
2325
- uses: actions/cache@v2
2426
with:
2527
path: deps
26-
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
27-
restore-keys: ${{ runner.os }}-mix-
28-
28+
key: ${{ matrix.os }}-otp_${{ matrix.otp }}-elixir_${{ matrix.elixir }}-mix_${{ hashFiles('**/mix.lock') }}
29+
restore-keys: ${{ matrix.os }}-otp_${{ matrix.otp }}-elixir_${{ matrix.elixir }}-mix_
2930
- run: mix deps.get
3031
- run: mix deps.compile
3132
- run: mix format --check-formatted
@@ -40,55 +41,34 @@ jobs:
4041
strategy:
4142
fail-fast: false
4243
matrix:
43-
os:
44-
- ubuntu-20.04
45-
elixir:
46-
- "1.13"
47-
- "1.12"
48-
- "1.11"
49-
- "1.10"
50-
otp:
51-
- "24"
52-
- "23"
53-
- "21"
54-
exclude:
55-
- elixir: "1.13"
56-
otp: "21"
57-
- elixir: "1.12"
58-
otp: "21"
59-
- elixir: "1.11"
60-
otp: "21"
61-
- elixir: "1.10"
62-
otp: "21"
63-
# Combination Elixir 1.11.4 / OTP 24 failing for hex
64-
- elixir: "1.11"
65-
otp: "24"
66-
- elixir: "1.10"
67-
otp: "24"
44+
os: ["ubuntu-20.04"]
45+
elixir: ["1.13", "1.12", "1.11", "1.10"]
46+
otp: ["24", "23", "22"]
6847
include:
6948
- os: windows-2019
7049
elixir: "1.13"
7150
otp: "24"
7251
- os: windows-2019
7352
elixir: "1.12"
7453
otp: "24"
54+
exclude:
55+
- elixir: "1.13"
56+
otp: "21"
57+
- elixir: "1.12"
58+
otp: "21"
7559
steps:
7660
- uses: actions/checkout@v2
77-
7861
- uses: erlef/setup-beam@v1
7962
with:
8063
otp-version: ${{ matrix.otp }}
8164
elixir-version: ${{ matrix.elixir }}
82-
8365
- uses: egor-tensin/vs-shell@v2
8466
if: runner.os == 'Windows'
85-
8667
- uses: actions/cache@v2
8768
with:
8869
path: deps
89-
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
90-
restore-keys: ${{ runner.os }}-mix-
91-
70+
key: ${{ matrix.os }}-otp_${{ matrix.otp }}-elixir_${{ matrix.elixir }}-mix_${{ hashFiles('**/mix.lock') }}
71+
restore-keys: ${{ matrix.os }}-otp_${{ matrix.otp }}-elixir_${{ matrix.elixir }}-mix_
9272
- run: mix deps.get --only test
9373
- run: mix deps.compile
9474
- run: mix compile

0 commit comments

Comments
 (0)