From 66a8e10a5ce172b2331d7897bb3f7ce246aad889 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Sun, 17 May 2020 10:54:50 -0400 Subject: [PATCH 1/5] Add older and newer Elixir/OTP versions --- .github/workflows/test.yml | 4 ++++ dist/.github/workflows/test.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 165343a..3e56847 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,10 @@ jobs: strategy: matrix: pair: + - otp-version: 18.x + elixir-version: 1.1.x + - otp-version: 23 + elixir-version: 1.10 # Full Versions - otp-version: 22.0 elixir-version: 1.9.1 diff --git a/dist/.github/workflows/test.yml b/dist/.github/workflows/test.yml index 165343a..3e56847 100644 --- a/dist/.github/workflows/test.yml +++ b/dist/.github/workflows/test.yml @@ -12,6 +12,10 @@ jobs: strategy: matrix: pair: + - otp-version: 18.x + elixir-version: 1.1.x + - otp-version: 23 + elixir-version: 1.10 # Full Versions - otp-version: 22.0 elixir-version: 1.9.1 From 1a26cf429fe51bd254fa0f63ea9418bc716acc95 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Sun, 17 May 2020 10:56:04 -0400 Subject: [PATCH 2/5] Allow older Elixir versions in test mix.exs --- test-project/mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-project/mix.exs b/test-project/mix.exs index 1f4f680..69d6504 100644 --- a/test-project/mix.exs +++ b/test-project/mix.exs @@ -5,7 +5,7 @@ defmodule Test.MixProject do [ app: :test, version: "0.1.0", - elixir: "~> 1.9", + elixir: "~> 1.1", start_permanent: Mix.env() == :prod, deps: deps() ] From 920f341bb84bac888a6383a87301dbc77a28ccfa Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Sun, 17 May 2020 10:57:29 -0400 Subject: [PATCH 3/5] Add exact test versions --- .github/workflows/test.yml | 6 +++--- dist/.github/workflows/test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e56847..401254f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,9 +12,9 @@ jobs: strategy: matrix: pair: - - otp-version: 18.x - elixir-version: 1.1.x - - otp-version: 23 + - otp-version: 18.0 + elixir-version: 1.1 + - otp-version: 23.0 elixir-version: 1.10 # Full Versions - otp-version: 22.0 diff --git a/dist/.github/workflows/test.yml b/dist/.github/workflows/test.yml index 3e56847..401254f 100644 --- a/dist/.github/workflows/test.yml +++ b/dist/.github/workflows/test.yml @@ -12,9 +12,9 @@ jobs: strategy: matrix: pair: - - otp-version: 18.x - elixir-version: 1.1.x - - otp-version: 23 + - otp-version: 18.0 + elixir-version: 1.1 + - otp-version: 23.0 elixir-version: 1.10 # Full Versions - otp-version: 22.0 From 22296354db4a78db46cf849d0bbeffe9625485e3 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Sun, 17 May 2020 10:59:06 -0400 Subject: [PATCH 4/5] Specify all versions as strings --- .github/workflows/test.yml | 18 +++++++++--------- dist/.github/workflows/test.yml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 401254f..3b5d36d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,18 +12,18 @@ jobs: strategy: matrix: pair: - - otp-version: 18.0 - elixir-version: 1.1 - - otp-version: 23.0 - elixir-version: 1.10 + - otp-version: '18.0' + elixir-version: '1.1' + - otp-version: '23.0' + elixir-version: '1.10' # Full Versions - - otp-version: 22.0 - elixir-version: 1.9.1 + - otp-version: '22.0' + elixir-version: '1.9.1' # Semver ranges - - otp-version: 21.x - elixir-version: <1.9.1 + - otp-version: '21.x' + elixir-version: '<1.9.1' # Branches - - otp-version: 22.0 + - otp-version: '22.0' elixir-version: master steps: - uses: actions/checkout@v2 diff --git a/dist/.github/workflows/test.yml b/dist/.github/workflows/test.yml index 401254f..3b5d36d 100644 --- a/dist/.github/workflows/test.yml +++ b/dist/.github/workflows/test.yml @@ -12,18 +12,18 @@ jobs: strategy: matrix: pair: - - otp-version: 18.0 - elixir-version: 1.1 - - otp-version: 23.0 - elixir-version: 1.10 + - otp-version: '18.0' + elixir-version: '1.1' + - otp-version: '23.0' + elixir-version: '1.10' # Full Versions - - otp-version: 22.0 - elixir-version: 1.9.1 + - otp-version: '22.0' + elixir-version: '1.9.1' # Semver ranges - - otp-version: 21.x - elixir-version: <1.9.1 + - otp-version: '21.x' + elixir-version: '<1.9.1' # Branches - - otp-version: 22.0 + - otp-version: '22.0' elixir-version: master steps: - uses: actions/checkout@v2 From 0e4061cbb4d8642fb4599ae91853f5dc2e354765 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Sun, 17 May 2020 11:01:44 -0400 Subject: [PATCH 5/5] Use strings in README, add notice about versions as strings --- README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3dd87d9..f447269 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ For best results, we recommend specifying exact OTP and Elixir versions. However, values like `22.x` are also accepted, and we attempt to resolve them according to semantic versioning rules. +Additionally, it is recommended that one specifies OTP and Elixir versions +using YAML strings, as these examples do, so that numbers like `23.0` don't +end up being parsed as `23`, which is not equivalent. + ### Basic example ```yaml @@ -33,8 +37,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-elixir@v1 with: - otp-version: 22.2 - elixir-version: 1.9.4 + otp-version: '22.2' + elixir-version: '1.9.4' - run: mix deps.get - run: mix test ``` @@ -50,8 +54,8 @@ jobs: name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} strategy: matrix: - otp: [20.3, 21.3, 22.2] - elixir: [1.8.2, 1.9.4] + otp: ['20.3', '21.3', '22.2'] + elixir: ['1.8.2', '1.9.4'] steps: - uses: actions/checkout@v2 - uses: actions/setup-elixir@v1 @@ -87,8 +91,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-elixir@v1 with: - otp-version: 22.2 - elixir-version: 1.9.4 + otp-version: '22.2' + elixir-version: '1.9.4' - run: mix deps.get - run: mix test ```