Skip to content

add CI badge to top of readme #5

add CI badge to top of readme

add CI badge to top of readme #5

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
mix_test:
env:
MIX_ENV: test
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- elixir: 1.18.1
otp: 27.2
lint: true
# A job has any number of steps: we will define them here
# Each dash (-) represents a step. Sometimes we give them a custom name, sometimes we leave it if it's obvious.
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps and _build cache
uses: actions/cache@v4
with:
path: |
deps
_build
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get --only test
- name: Remove compiled application files
run: mix clean
- name: Compile & lint
run: |
mix compile --warnings-as-errors
mix format --check-formatted
mix credo
if: ${{ matrix.lint }}
- name: Run tests
run: mix test