Skip to content

Commit

Permalink
[Actions] Test against multiple versions (#5)
Browse files Browse the repository at this point in the history
* [Actions] Test against multiple versions
* Follow `amqp` CI matrix
* [Actions] Use single quotes
* [Actions] Run `setup` job with version matrix
* [Actions] Ensure cache key contains versions
  • Loading branch information
timothyvanderaerden authored Oct 11, 2024
1 parent 7a57efd commit 17fe4a5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Setup
description: Setup BEAM and compile cache

runs:
using: composite
steps:
- uses: erlef/setup-beam@v1
with:
otp-version: "26"
elixir-version: "1.17"
otp-version: ${{matrix.otp || '26.x'}}
elixir-version: ${{matrix.elixir || '1.17.x'}}

- name: Retrieve compile cache
uses: actions/cache@v4
Expand All @@ -15,4 +16,4 @@ runs:
path: |
deps
_build
key: ${{ hashFiles('mix.lock', '.tool-versions') }}
key: ${{hashFiles('mix.lock')}}-${{matrix.otp || '26.x'}}-${{matrix.elixir || '1.17.x'}}
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ jobs:
setup:
name: Setup
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# rabbit_common currently doesn't support OTP27
- otp: 26.x # 27.x
elixir: 1.17.x
- otp: 26.x
elixir: 1.16.x
- otp: 26.x
elixir: 1.15.x
- otp: 26.x
elixir: 1.14.5
- otp: 25.x
elixir: 1.13.4
- otp: 24.x
elixir: 1.12.3

steps:
- name: Checkout commit
Expand Down Expand Up @@ -64,6 +81,23 @@ jobs:
name: Test
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# rabbit_common currently doesn't support OTP27
- otp: 26.x # 27.x
elixir: 1.17.x
- otp: 26.x
elixir: 1.16.x
- otp: 26.x
elixir: 1.15.x
- otp: 26.x
elixir: 1.14.5
- otp: 25.x
elixir: 1.13.4
- otp: 24.x
elixir: 1.12.3
env:
MIX_ENV: test
services:
Expand Down

0 comments on commit 17fe4a5

Please sign in to comment.