Skip to content

cache

cache #6

Workflow file for this run

name: CI
on:
pull_request:
push:
jobs:
main:
# Old ubuntu needed to support erlang 22
runs-on: ubuntu-latest
strategy:
matrix:
include:
- elixir: '1.10.4'
otp: '22.3.4.27'
lint: true
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@v4
with:
path: |
_build
deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- run: mix deps.get --check-locked
- run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: MIX_ENV=test mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: MIX_ENV=prod mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: mix format --check-formatted
if: ${{ matrix.lint }}
- run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- run: mix deps.compile
- run: mix docs
- run: mix test
- run: mix dialyzer