2020-10-09 19:33:15 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2021-03-18 20:38:15 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-10-09 19:33:15 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2021-11-13 22:24:21 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2021-03-18 20:38:15 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-10-09 19:33:15 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-03-18 20:38:15 +00:00
|
|
|
include:
|
|
|
|
- pair:
|
|
|
|
elixir: 1.10.4
|
2021-05-22 22:08:39 +00:00
|
|
|
otp: 21.3
|
2021-03-18 20:38:15 +00:00
|
|
|
- pair:
|
|
|
|
elixir: 1.11.3
|
|
|
|
otp: 22.2
|
|
|
|
- pair:
|
2021-11-13 22:24:21 +00:00
|
|
|
elixir: 1.12.3
|
2021-03-18 20:38:15 +00:00
|
|
|
otp: 23.2.5
|
2021-05-22 22:08:39 +00:00
|
|
|
- pair:
|
2021-11-13 22:24:21 +00:00
|
|
|
elixir: 1.12.3
|
|
|
|
otp: 24.1.3
|
2021-12-15 22:27:29 +00:00
|
|
|
- pair:
|
|
|
|
elixir: 1.13.1
|
|
|
|
otp: 24.1.3
|
2021-03-18 20:38:15 +00:00
|
|
|
lint: lint
|
2020-10-09 19:33:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-03-18 20:38:15 +00:00
|
|
|
- uses: erlef/setup-elixir@v1
|
2020-10-09 19:33:15 +00:00
|
|
|
with:
|
2021-03-18 20:38:15 +00:00
|
|
|
otp-version: ${{matrix.pair.otp}}
|
2020-10-09 19:33:15 +00:00
|
|
|
elixir-version: ${{matrix.pair.elixir}}
|
|
|
|
|
2021-03-18 20:38:15 +00:00
|
|
|
- name: Install Dependencies
|
2021-03-18 21:50:28 +00:00
|
|
|
run: mix deps.get
|
2021-03-18 20:38:15 +00:00
|
|
|
|
|
|
|
- run: mix format --check-formatted
|
|
|
|
if: ${{ matrix.lint }}
|
|
|
|
|
|
|
|
- run: mix deps.get && mix deps.unlock --check-unused
|
|
|
|
if: ${{ matrix.lint }}
|
|
|
|
|
|
|
|
- run: mix deps.compile
|
|
|
|
|
|
|
|
- run: mix compile --warnings-as-errors
|
|
|
|
if: ${{ matrix.lint }}
|
2020-10-09 19:33:15 +00:00
|
|
|
|
2021-03-18 21:50:28 +00:00
|
|
|
- run: MIX_ENV=test mix coveralls.github
|
2020-10-09 19:54:01 +00:00
|
|
|
|
|
|
|
- name: Retrieve PLT Cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
id: plt-cache
|
|
|
|
with:
|
|
|
|
path: priv/plts
|
2021-03-18 20:38:15 +00:00
|
|
|
key: ${{ runner.os }}-${{ matrix.pair.otp }}-${{ matrix.pair.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
|
2020-10-09 19:54:01 +00:00
|
|
|
|
|
|
|
- name: Create PLTs
|
|
|
|
if: steps.plt-cache.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
mkdir -p priv/plts
|
|
|
|
mix dialyzer --plt
|
|
|
|
|
|
|
|
- name: Run dialyzer
|
2021-03-18 21:50:28 +00:00
|
|
|
run: mix dialyzer --no-check
|