Skip to content

Polish and stuff

Polish and stuff #1

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: "1.11"
otp: "21.3"
- pair:
elixir: "1.16"
otp: "26.1"
lint: lint
steps:
- name: Check out this repository
uses: actions/checkout@v4
- name: Install Erlang and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp }}
elixir-version: ${{ matrix.pair.elixir }}
- name: Cache Mix dependencies
uses: actions/cache@v3
with:
path: |
deps
_build
key: |
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-
- name: Fetch dependencies
run: mix deps.get --check-lock
- name: Check formatting
run: mix format --check-formatted
if: ${{ matrix.lint }}
- name: Check unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: Compile dependencies
run: mix deps.compile
- name: Compile and check for warnings
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- name: Run tests
run: mix test