Skip to content

Commit

Permalink
Tweak our test combos (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira authored Apr 19, 2021
1 parent 78d10b5 commit d2707f3
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 66 deletions.
141 changes: 78 additions & 63 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,99 +21,114 @@ jobs:
integration_test:
name: >
Pre-release integration tests
(Erlang/OTP ${{matrix.pair.otp-version}},
Elixir ${{matrix.pair.elixir-version}},
rebar3 ${{matrix.pair.rebar3-version}})
runs-on: ubuntu-18.04
(Ubuntu ${{matrix.combo.os}},
Erlang/OTP ${{matrix.combo.otp-version}},
Elixir ${{matrix.combo.elixir-version}},
rebar3 ${{matrix.combo.rebar3-version}})
runs-on: ${{matrix.combo.os}}
strategy:
fail-fast: false
matrix:
pair:
# Full Versions
- otp-version: '22.0'
elixir-version: '1.9.1'
- otp-version: '22.3.4'
rebar3-version: '3.14.4'
# Semver ranges
- otp-version: '21.x'
elixir-version: '<1.9.1'
- otp-version: '21.x'
rebar3-version: '3.14.4'
# Branches
- otp-version: '22.0'
elixir-version: master
- otp-version: 'master'
elixir-version: '1.11.3'
# Pre-releases
- otp-version: '23.0'
elixir-version: '1.11.0-rc.0'
# Fallback to Elixir (with no OTP)
- otp-version: '24.0-rc1'
elixir-version: '1.9.3'
# Miscellaneous combos
- elixir-version: 'master'
otp-version: '22.3'
- elixir-version: 'master'
combo:
- elixir-version: 'v1.0'
otp-version: '17'
os: 'ubuntu-16.04'
- elixir-version: 'v1.0'
otp-version: '17'
os: 'ubuntu-18.04'
- elixir-version: 'v1.1'
otp-version: '18'
os: 'ubuntu-16.04'
- elixir-version: 'v1.1'
otp-version: '18'
os: 'ubuntu-18.04'
- elixir-version: 'v1.2'
otp-version: '19'
rebar3-version: '3.10'
os: 'ubuntu-16.04'
- elixir-version: 'v1.2'
otp-version: '19'
rebar3-version: '3.10'
os: 'ubuntu-18.04'
- elixir-version: 'v1.4'
otp-version: '20'
rebar3-version: '3.11'
os: 'ubuntu-16.04'
- elixir-version: 'v1.4'
otp-version: '20'
rebar3-version: '3.11'
os: 'ubuntu-18.04'
- elixir-version: 'v1.4'
otp-version: '20'
rebar3-version: '3.11'
os: 'ubuntu-20.04'
- elixir-version: 'v1.6'
otp-version: '21'
rebar3-version: '3.12'
os: 'ubuntu-16.04'
- elixir-version: 'v1.6'
otp-version: '21'
rebar3-version: '3.12'
os: 'ubuntu-18.04'
- elixir-version: 'v1.6'
otp-version: '21'
rebar3-version: '3.12'
os: 'ubuntu-20.04'
- elixir-version: 'v1.7'
otp-version: '22'
- elixir-version: 'master'
otp-version: '^22'
- elixir-version: 'master'
rebar3-version: '3.13'
os: 'ubuntu-16.04'
- elixir-version: 'v1.7'
otp-version: '22'
- elixir-version: '1.6.5'
otp-version: 'maint-21'
- elixir-version: 'v1.6.5'
otp-version: 'maint-21'
- elixir-version: 'v1.9.x'
otp-version: '21.1'
- elixir-version: '1.9.x'
otp-version: '21'
- elixir-version: 'v1.8.x'
rebar3-version: '3.13'
os: 'ubuntu-18.04'
- elixir-version: 'v1.7'
otp-version: '22'
- elixir-version: 'v1.8.x'
otp-version: '23.1'
- elixir-version: 'v1.8'
otp-version: '^22.3'
rebar3-version: '3.13'
os: 'ubuntu-20.04'
- elixir-version: 'v1.10'
otp-version: '23'
rebar3-version: '3.14'
os: 'ubuntu-16.04'
- elixir-version: 'v1.10'
otp-version: '23'
rebar3-version: '3.14'
os: 'ubuntu-18.04'
- elixir-version: 'v1.10'
otp-version: '21.x'
- elixir-version: 'v1.x'
otp-version: 'master'
- elixir-version: 'v1.11.0-rc.0'
otp-version: '23'
- elixir-version: 'v1.11.0-rc.0'
otp-version: '23.0'
- elixir-version: 'v1.11.0-rc.0'
otp-version: 'master'
rebar3-version: '3.14'
os: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v2
- name: Use erlef/setup-beam
id: setup-beam
uses: ./
with:
otp-version: ${{matrix.pair.otp-version}}
elixir-version: ${{matrix.pair.elixir-version}}
rebar3-version: ${{matrix.pair.rebar3-version}}
otp-version: ${{matrix.combo.otp-version}}
elixir-version: ${{matrix.combo.elixir-version}}
rebar3-version: ${{matrix.combo.rebar3-version}}
- name: Erlang/OTP version (action)
run: echo "Erlang/OTP ${{steps.setup-beam.outputs.otp-version}}"
- name: Elixir version (action)
run: echo "Elixir ${{steps.setup-beam.outputs.elixir-version}}"
if: ${{matrix.pair.elixir-version}}
if: ${{matrix.combo.elixir-version}}
- name: rebar3 version (action)
run: echo "rebar3 ${{steps.setup-beam.outputs.rebar3-version}}"
if: ${{matrix.pair.rebar3-version}}
if: ${{matrix.combo.rebar3-version}}
- name: mix version and help (CLI)
run: |
mix -v
mix help local.rebar
mix help local.hex
if: ${{matrix.pair.elixir-version}}
if: ${{matrix.combo.elixir-version}}
- name: Run Mix project tests
run: |
cd test-projects/mix
mix deps.get
mix test
if: ${{matrix.pair.elixir-version}}
if: ${{matrix.combo.elixir-version}}
- name: Run rebar3 project tests
run: |
cd test-projects/rebar3
rebar3 as test do xref,dialyzer,ct,cover
if: ${{matrix.pair.rebar3-version}}
rebar3 ct
if: ${{matrix.combo.rebar3-version}}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ not match a pre-release.
### Compatibility between Ubuntu and Erlang/OTP

This list presents the known working version combos between Ubuntu
and Erlang/OTP. Non-listed combos are not guaranteed to work.
and Erlang/OTP.

| Ubuntu | Erlang/OTP | Status
|- |- |-
| ubuntu-16.04 | 17 - 23 | ✅
| ubuntu-18.04 | 20 - 23 | ✅
| ubuntu-18.04 | 17 - 23 | ✅
| ubuntu-20.04 | 20 - 23 | ✅

### Basic example (Elixir)
Expand Down
4 changes: 4 additions & 0 deletions test-projects/mix/test/test_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ defmodule TestTest do
out = Logfmt.encode(foo: "bar")
assert out == "foo=bar"
end

test "ensures ssl" do
assert {:ok, _} = Application.ensure_all_started(:ssl)
end
end
5 changes: 4 additions & 1 deletion test-projects/rebar3/test/mylib_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
-compile([export_all, nowarn_export_all]).

all() ->
[hello_world].
[hello_world, ssl_ok].

hello_world(_Config) ->
?assertEqual(world, mylib:hello()).

ssl_ok(_Config) ->
{ok, _} = application:ensure_all_started(ssl).

0 comments on commit d2707f3

Please sign in to comment.