Skip to content

Run CI on every push and pull_request #9

Run CI on every push and pull_request

Run CI on every push and pull_request #9

Workflow file for this run

name: CI
on: [push, pull_request]
env:
MIX_ENV: test
ImageOS: ubuntu22
permissions:
contents: read
jobs:
test:
name: Test on Elixir ${{ matrix.elixir }} with OTP ${{ matrix.otp }}
runs-on: ubuntu-22.04
strategy:
matrix:
elixir: ["1.13", "1.14", "1.15", "1.16", "1.17"]
otp: ["24", "25", "26", "27"]
exclude:
- elixir: "1.13"
otp: "26"
- elixir: "1.13"
otp: "27"
- elixir: "1.14"
otp: "27"
- elixir: "1.15"
otp: "27"
- elixir: "1.16"
otp: "27"
- elixir: "1.17"
otp: "24"
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Compiles without warnings
run: mix compile --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted
- name: Run Credo in strict mode
run: mix credo --strict
- name: Run tests
run: mix test