From 5629d4610cf2fadc62dc3ff98c5fd1f000c53e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Almir=20Saraj=C4=8Di=C4=87?= Date: Fri, 21 Jun 2024 19:29:37 +0200 Subject: [PATCH] Fix CI issue caused by Credo --- .github/github_workflows.ex | 40 ++++++++++++++++++++++++------------- .github/workflows/ci.yml | 21 ------------------- CHANGELOG.md | 4 ++++ 3 files changed, 30 insertions(+), 35 deletions(-) diff --git a/.github/github_workflows.ex b/.github/github_workflows.ex index b6459f2..a6900ec 100644 --- a/.github/github_workflows.ex +++ b/.github/github_workflows.ex @@ -105,6 +105,13 @@ defmodule GithubWorkflows do end defp elixir_job(name, opts) do + matrix = + Keyword.get(opts, :matrix, + versions: [ + latest_versions_matrix() + ] + ) + needs = Keyword.get(opts, :needs) steps = Keyword.get(opts, :steps, []) @@ -113,20 +120,7 @@ defmodule GithubWorkflows do "runs-on": "${{ matrix.versions.runner-image }}", strategy: [ "fail-fast": false, - matrix: [ - versions: [ - [ - elixir: "1.11", - otp: "21.3", - "runner-image": "ubuntu-20.04" - ], - [ - elixir: "1.17", - otp: "27.0", - "runner-image": "ubuntu-latest" - ] - ] - ] + matrix: matrix ], steps: [ @@ -215,6 +209,16 @@ defmodule GithubWorkflows do defp test_job do elixir_job("Test", + matrix: [ + versions: [ + [ + elixir: "1.11", + otp: "21.3", + "runner-image": "ubuntu-20.04" + ], + latest_versions_matrix() + ] + ], needs: :compile, steps: [ [ @@ -248,6 +252,14 @@ defmodule GithubWorkflows do ] end + defp latest_versions_matrix do + [ + elixir: "1.17", + otp: "27.0", + "runner-image": "ubuntu-latest" + ] + end + defp cache_opts(opts) do prefix = Keyword.get(opts, :prefix) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a8d58e..898f941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -52,9 +49,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -86,9 +80,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -120,9 +111,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -165,9 +153,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -199,9 +184,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest @@ -284,9 +266,6 @@ jobs: fail-fast: false matrix: versions: - - elixir: 1.11 - otp: 21.3 - runner-image: ubuntu-20.04 - elixir: 1.17 otp: 27.0 runner-image: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 029b53f..7383eeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.3 + +- Fixed CI by only running tests on the old version of Elixir (Credo requires version 1.13 at least). + ## 0.1.2 (2024-06-21) - Removed `fast_yaml` dependency.