Skip to content

Commit

Permalink
better CI strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
artkay committed Jul 4, 2024
1 parent f51f186 commit 2e27fa9
Showing 1 changed file with 43 additions and 7 deletions.
50 changes: 43 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,57 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
otp: [24, 25, 26, 27]
elixir: ["1.13", "1.14", "1.15", "1.16", "1.17"]
include:
- pair:
otp: 27.x
elixir: 1.17.x
- pair:
otp: 26.x
elixir: 1.16.x
- pair:
otp: 26.x
elixir: 1.15.x
- pair:
otp: 25.x
elixir: 1.15.x
- pair:
otp: 25.x
elixir: 1.14.x
- pair:
otp: 25.x
elixir: 1.13.x
- pair:
otp: 24.x
elixir: 1.15.x
- pair:
otp: 24.x
elixir: 1.14.x
- pair:
otp: 24.x
elixir: 1.13.x
- pair:
otp: 24.x
elixir: 1.12.x
- pair:
otp: 23.x
elixir: 1.14.x
- pair:
otp: 23.x
elixir: 1.13.x

steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.elixir}}
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.pair.elixir}}
otp-version: ${{matrix.pair.otp}}
- uses: actions/cache@v4
id: mix-cache # id to use in retrieve action
with:
path: |
_build
deps
key: test-cache-v0-${{matrix.elixir}}-${{matrix.otp}}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
key: test-cache-v0-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- if: steps.mix-cache.outputs.cache-hit != 'true'
run: mix do deps.get, deps.compile
- run: mix credo
Expand All @@ -31,8 +67,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
otp: [24]
elixir: ["1.15"]
otp: [27]
elixir: ["1.17"]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand Down

0 comments on commit 2e27fa9

Please sign in to comment.