From 789a697311b56c5f8ed2f307adad4dcbc5a73e69 Mon Sep 17 00:00:00 2001 From: Marty Zalega Date: Mon, 11 Nov 2024 19:23:36 +1000 Subject: [PATCH] Update and expand the versions of elixir and opt to check in CI --- .github/workflows/ci.yml | 72 +++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94d4779..a40b57d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,40 +12,44 @@ jobs: strategy: fail-fast: false matrix: + # Source: https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp + elixir-version: [1.14, 1.15, 1.16, 1.17] + otp-version: [24, 25, 26] + lint: [lint] include: - - pair: - elixir-version: 1.14 - otp-version: 24.3 - lint: lint - - pair: - elixir-version: 1.15 - otp-version: 26.0 + - elixir-version: 1.17 + otp-version: 27 lint: lint + exclude: + - elixir-version: 1.14 + otp-version: 26 + - elixir-version: 1.17 + otp-version: 24 steps: - - uses: actions/checkout@v4 - - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - elixir-version: ${{matrix.pair.elixir-version}} - otp-version: ${{matrix.pair.otp-version}} - - name: Restore elixir dependencies cache - uses: actions/cache@v4 - with: - path: deps - key: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}-${{hashFiles('**/mix.lock')}} - restore-keys: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}- - - name: Install dependencies - run: mix deps.get --only test - - name: Check syntax formatting - run: mix format --check-formatted - if: ${{matrix.lint}} - - name: Check for unused dependencies - run: mix deps.unlock --check-unused - if: ${{matrix.lint}} - - name: Compile dependencies - run: mix deps.compile - - name: Compile - run: mix compile --warnings-as-errors - if: ${{matrix.lint}} - - name: Run tests - run: mix test + - uses: actions/checkout@v4 + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: ${{matrix.elixir-version}} + otp-version: ${{matrix.otp-version}} + - name: Restore elixir dependencies cache + uses: actions/cache@v4 + with: + path: deps + key: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}-${{hashFiles('**/mix.lock')}} + restore-keys: ${{runner.os}}-mix-${{matrix.elixir-version}}-${{matrix.otp-version}}- + - name: Install dependencies + run: mix deps.get --only test + - name: Check syntax formatting + run: mix format --check-formatted + if: ${{matrix.lint}} + - name: Check for unused dependencies + run: mix deps.unlock --check-unused + if: ${{matrix.lint}} + - name: Compile dependencies + run: mix deps.compile + - name: Compile + run: mix compile --warnings-as-errors + if: ${{matrix.lint}} + - name: Run tests + run: mix test