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
|
|
|
|
|
2024-11-17 20:36:43 +02:00
|
|
|
- name: Setup Elixir
|
|
|
|
run: curl -fsSO https://elixir-lang.org/install.sh && \
|
2024-11-17 21:05:56 +02:00
|
|
|
./install.sh elixir@1.17.3 otp@27.1.2 && \
|
2024-11-17 20:36:43 +02:00
|
|
|
installs_dir=$HOME/.elixir-install/installs && \
|
|
|
|
export PATH=$installs_dir/otp/27.1.2/bin:$PATH && \
|
|
|
|
export PATH=$installs_dir/elixir/1.17.3-otp-27/bin:$PATH
|
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
|