Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 1.48 KB

File metadata and controls

60 lines (46 loc) · 1.48 KB

Elixir Credo

Runs Dialyxir in your project.

How-to Guides

Get Started

  1. Ensure that Credo dependency is present in your project. Check your mix.exs file.

     defmodule MyLibrary.MixProject do
       use Mix.Project
     
       def project do
         [
           # ...
           deps: deps()
         ]
       end
     
       defp deps do
         [
           # ... here, is an example of how to add it
           {:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
         ]
       end
     end
  2. Make sure actions/checkout action is used before this action.

  3. Add this action to your job in your workflow, here is an example:

    #...
    jobs:
      credo:
        name: Run Credo
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2 # checkout the repository first
          - uses: straw-hat-team/github-actions-workflows/elixir/credo@master
            with:
              elixir-version: '1.11' # optional, fallback to use .tool-versions
              otp-version: '22.3' # optional, fallback to use .tool-versions
              version-type: 'loose' # optional, fallback to strict

Fix credo could not be found error

If you see the following error:

** (Mix) The task "credo" could not be found
  1. Verify that credo dependency was added correctly as a dependency.