Skip to content

Commit

Permalink
Fix CI issue caused by Credo
Browse files Browse the repository at this point in the history
  • Loading branch information
almirsarajcic committed Jun 21, 2024
1 parent 49a0097 commit 5629d46
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
40 changes: 26 additions & 14 deletions .github/github_workflows.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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, [])

Expand All @@ -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:
[
Expand Down Expand Up @@ -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: [
[
Expand Down Expand Up @@ -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)

Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit 5629d46

Please sign in to comment.