From 77d097d09c86d7ea87bf7ce34b20e8549ea3518f Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Tue, 18 Jun 2024 16:47:54 +0200 Subject: [PATCH] Add code linting and analysis to CI --- .github/workflows/ci.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0a4f3851..43115e93 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,27 @@ on: branches: [ "actions" ] jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Set up Erlang and Elixir + uses: erlef/setup-beam@v1 + with: + otp-version: master + elixir-version: main + - name: Checkout code + uses: actions/checkout@v4 + - name: Get dependencies + run: mix deps.get + - name: Check for compilation errors + run: mix compile --warnings-as-errors + - name: Check code formatting + run: mix format --check-formatted + - name: Analyze code with Credo + run: mix credo --strict + - name: Analyze code with Dialyzer + run: mix dialyzer --format dialyzer + test: runs-on: ubuntu-latest strategy: