Add newer Elixir versions on CI (#83) #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
branches: | |
- "main" | |
push: | |
branches: | |
- "main" | |
jobs: | |
format: | |
name: Check formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "26.0" | |
elixir-version: "1.15.4" | |
- uses: actions/cache@v2 | |
name: Cache dependencies | |
with: | |
path: | | |
deps | |
key: deps-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
deps-${{ hashFiles('mix.lock') }} | |
deps- | |
- run: mix deps.get | |
- run: mix format --check-formatted | |
test: | |
name: Test on Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: 24.0 | |
elixir: 1.12.0 | |
- otp: 24.3 | |
elixir: 1.13.4 | |
- otp: 25.3 | |
elixir: 1.14.5 | |
- otp: 26.0 | |
elixir: 1.15.4 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- uses: actions/cache@v2 | |
name: Cache dependencies | |
with: | |
path: | | |
deps | |
key: deps-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
deps-${{ hashFiles('mix.lock') }} | |
deps- | |
- run: mix deps.get | |
- uses: actions/cache@v2 | |
name: Cache build | |
with: | |
path: | | |
_build | |
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- | |
- run: mix test | |
dialyze: | |
name: Dialyze on Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- otp: 24.0 | |
elixir: 1.12.0 | |
- otp: 24.3 | |
elixir: 1.13.4 | |
- otp: 25.3 | |
elixir: 1.14.5 | |
- otp: 26.0 | |
elixir: 1.15.4 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
elixir-version: ${{ matrix.elixir }} | |
- uses: actions/cache@v2 | |
name: Cache dependencies | |
with: | |
path: | | |
deps | |
key: deps-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
deps-${{ hashFiles('mix.lock') }} | |
deps- | |
- run: mix deps.get | |
- uses: actions/cache@v2 | |
name: Cache build | |
with: | |
path: | | |
_build | |
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
restore-keys: | | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }} | |
build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}- | |
- run: mix dialyzer --halt-exit-status |