2020-10-09 19:33:15 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
name: Check Formatting
|
2021-03-06 01:36:23 +00:00
|
|
|
runs-on: ubuntu-16.04
|
2020-10-09 19:33:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Elixir
|
2021-03-06 01:36:23 +00:00
|
|
|
uses: erlef/setup-elixir@v1
|
2020-10-09 19:33:15 +00:00
|
|
|
with:
|
|
|
|
otp-version: 22.2
|
|
|
|
elixir-version: 1.10.4
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: mix deps.get
|
|
|
|
|
|
|
|
- name: Run "mix format"
|
|
|
|
run: mix format --check-formatted
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: Build and test
|
2021-03-06 01:36:23 +00:00
|
|
|
runs-on: ubuntu-16.04
|
2020-10-09 19:33:15 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
pair:
|
|
|
|
- erlang: 23.1
|
2020-10-18 19:46:08 +00:00
|
|
|
elixir: 1.11.1
|
2020-10-09 19:33:15 +00:00
|
|
|
- erlang: 22.2
|
2020-10-18 19:46:08 +00:00
|
|
|
elixir: 1.11.1
|
2020-10-09 19:33:15 +00:00
|
|
|
- erlang: 21.3
|
2020-10-18 19:46:08 +00:00
|
|
|
elixir: 1.11.1
|
|
|
|
- erlang: 22.2
|
2020-10-09 19:33:15 +00:00
|
|
|
elixir: 1.10.4
|
|
|
|
- erlang: 20.3.1
|
2020-11-12 21:50:38 +00:00
|
|
|
elixir: 1.9.4
|
2020-10-09 20:00:43 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-10-09 19:33:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Elixir
|
2021-03-06 01:36:23 +00:00
|
|
|
uses: erlef/setup-elixir@v1
|
2020-10-09 19:33:15 +00:00
|
|
|
with:
|
|
|
|
otp-version: ${{matrix.pair.erlang}}
|
|
|
|
elixir-version: ${{matrix.pair.elixir}}
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
mix local.hex --force
|
|
|
|
mix local.rebar --force
|
|
|
|
mix deps.get
|
|
|
|
|
|
|
|
- name: Run tests
|
2020-10-09 20:08:12 +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
|
2020-10-09 20:43:44 +00:00
|
|
|
key: ${{ runner.os }}-${{ matrix.pair.erlang }}-${{ 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
|
2020-10-09 20:43:44 +00:00
|
|
|
run: mix dialyzer --no-check
|