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:13:57 +02:00
|
|
|
- name: Install wget
|
|
|
|
run: sudo apt-get install -y openssl libssl-dev wget
|
|
|
|
|
2024-11-17 19:29:55 +02:00
|
|
|
- name: Install openssl
|
2024-11-17 20:16:30 +02:00
|
|
|
run: wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb && sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb && \
|
|
|
|
sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
|
2024-11-17 19:29:55 +02:00
|
|
|
|
2024-11-17 18:34:42 +02:00
|
|
|
- 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"
|
2024-11-17 19:35:41 +02:00
|
|
|
otp-version: "26.x"
|
2024-11-17 19:38:51 +02:00
|
|
|
install-rebar: false
|
2024-11-17 19:24:03 +02:00
|
|
|
hexpm-mirrors: |
|
|
|
|
https://builds.hex.pm
|
|
|
|
https://cdn.jsdelivr.net/hex
|
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
|