2024-11-17 18:34:42 +02:00
|
|
|
name: Checks
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Set up Elixir
|
2024-11-17 19:21:37 +02:00
|
|
|
uses: erlef/setup-beam@v1
|
2024-11-17 18:34:42 +02:00
|
|
|
with:
|
|
|
|
elixir-version: "1.17.x"
|
|
|
|
otp-version: "25.x"
|
2024-11-17 19:24:03 +02:00
|
|
|
rebar3-version: flase
|
2024-11-17 18:34:42 +02:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: mix deps.get
|
|
|
|
|
|
|
|
- name: Check formatting
|
|
|
|
run: mix format --check-formatted
|
|
|
|
|
|
|
|
- name: Run Credo
|
|
|
|
run: mix credo --strict
|
|
|
|
|
|
|
|
- name: Check for compiler warnings
|
|
|
|
run: mix compile --warnings-as-errors
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: mix test
|
|
|
|
|
|
|
|
- name: Check for unused dependencies
|
|
|
|
run: mix deps.unlock --check-unused
|