Skip to content

Commit

Permalink
add recommended combinations of Elixir and Erlang/OTP versions to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianomitre committed Oct 29, 2020
1 parent 12cdf14 commit 81e2daf
Showing 1 changed file with 34 additions and 11 deletions.
45 changes: 34 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,56 @@ on: [push, pull_request]

jobs:
credo:
name: Credo
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Install OTP and Elixir
uses: actions/setup-elixir@v1
with:
otp-version: 22.1
elixir-version: 1.9.4
otp-version: 23.1.1
elixir-version: 1.11.x

- run: mix deps.get
- run: mix compile
- run: mix format --check-formatted
- run: mix compile --warnings-as-errors
- run: mix credo

test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.7.x
otp: 19.3.6.13
- elixir: 1.8.x
otp: 20.3.8.26
- elixir: 1.9.x
otp: 20.3.8.26
- elixir: 1.10.x
otp: 21.3.8.18
- elixir: 1.11.x
otp: 21.3.8.18
- elixir: 1.11.x
otp: 23.1.1
warnings_as_errors: true
env:
MIX_ENV: test

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Install OTP and Elixir
uses: actions/setup-elixir@v1
with:
otp-version: 22.1
elixir-version: 1.9.4
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}

- run: mix deps.get
- run: MIX_ENV=test mix compile
- run: mix test
- run: mix deps.get --only test
- run: mix test --color 2>/tmp/tests.stderr
- name: Make sure tests do not have warnings
run: "! grep -v 'warning: ' /tmp/tests.stderr"
if: matrix.warnings_as_errors

0 comments on commit 81e2daf

Please sign in to comment.