diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 9cc6b85..cc9cd0b 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -55,7 +55,7 @@ jobs: key: ${{ runner.os }}-${{ steps.setup-elixir.otp-version }}-${{ steps.setup-elixir.elixir-version }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} - name: Create PLTs when cache miss - if: steps.plt-cache.outputs.cache-hit != 'true' + if: steps.plt-cache.outputs.cache-hit != 'true' # If plt cache was not found create plt directory and create plts run: | mkdir -p priv/plts mix dialyzer --plt @@ -66,5 +66,16 @@ jobs: - name: Run Sobelow run: mix sobelow --exit - # - name: Run Credo - # run: mix credo --strict + # Pronto + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: '2.6' + + - name: Setup pronto for credo + run: gem install pronto-credo --no-document + + - run: git fetch # This is required otherwise `pronto run -f github_pr -c origin/master` wont work + + - name: Run pronto + run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ github.token }}" pronto run -f github_pr -c origin/master diff --git a/mix.exs b/mix.exs index 92ce51c..bde4df6 100644 --- a/mix.exs +++ b/mix.exs @@ -79,8 +79,8 @@ defmodule BokBok.MixProject do "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "ecto.reset": ["ecto.drop", "ecto.setup"], test: ["ecto.create --quiet", "ecto.migrate", "test"], - # Run static code analysis tools and tests to check code quality - quality: ["format", "credo --strict", "sobelow --verbose", "dialyzer", "test"] + # Run static code analysis tools to check code quality + quality: ["format", "sobelow --verbose", "dialyzer", "credo --strict"] ] end end