name: CI
on:
pull_request:
push:
branches: master
jobs:
tests:
runs-on: ubuntu-latest
name: Test (${{matrix.elixir}}/${{matrix.otp}})
strategy:
matrix:
otp: [21.x]
elixir: [1.7.x, 1.8.x, 1.9.x, 1.10.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1.2.0
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: actions/cache@v1
id: cache
path: deps
key: ${{ runner.os }}-${{ matrix.elixir }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Run Tests
run: mix test
formatter:
name: Formatter (1.10.x/21.x)
otp-version: 21.x
elixir-version: 1.10.x
- name: Run Formatter
run: mix format --check-formatted