Skip to content

Update CI

Update CI #55

Workflow file for this run

name: Continuous Integration
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- "main"
jobs:
test:
env:
MIX_ENV: test
runs-on: ubuntu-20.04
name: Test (OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }})
strategy:
matrix:
otp: [24.x, 25.x, 26.x, 27.x]
elixir: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x]
exclude:
- otp: 27.x
elixir: 1.16.x
- otp: 27.x
elixir: 1.15.x
- otp: 27.x
elixir: 1.14.x
- otp: 27.x
elixir: 1.13.x
- otp: 27.x
elixir: 1.12.x
- otp: 26.x
elixir: 1.13.x
- otp: 26.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.12.x
- otp: 24.x
elixir: 1.17.x
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- run: mix deps.get
- run: mix compile
- run: mix test
lint:
runs-on: ubuntu-latest
name: Linting
strategy:
matrix:
elixir: ["1.17"]
otp: ["27"]
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: beam
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: PLT cache
uses: actions/cache@v3
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
path: |
priv/plts
- run: mix deps.get
- run: mix deps.unlock --check-unused
- run: mix compile --warnings-as-errors
- run: mix format --check-formatted
- run: mix credo --strict --all
- run: mix dialyzer --halt-exit-status